struct seq_file *s, const char *gname,
unsigned pin,
const struct pin_config_item *items,
- int nitems)
+ int nitems, int *print_sep)
{
int i;
seq_printf(s, "ERROR READING CONFIG SETTING %d ", i);
continue;
}
- /* Space between multiple configs */
- seq_puts(s, " ");
+ /* comma between multiple configs */
+ if (*print_sep)
+ seq_puts(s, ", ");
+ *print_sep = 1;
seq_puts(s, items[i].display);
/* Print unit if available */
if (items[i].has_arg) {
const char *gname, unsigned pin)
{
const struct pinconf_ops *ops = pctldev->desc->confops;
+ int print_sep = 0;
if (!ops->is_generic)
return;
/* generic parameters */
pinconf_generic_dump_one(pctldev, s, gname, pin, conf_items,
- ARRAY_SIZE(conf_items));
+ ARRAY_SIZE(conf_items), &print_sep);
/* driver-specific parameters */
if (pctldev->desc->num_custom_params &&
pctldev->desc->custom_conf_items)
pinconf_generic_dump_one(pctldev, s, gname, pin,
pctldev->desc->custom_conf_items,
- pctldev->desc->num_custom_params);
+ pctldev->desc->num_custom_params,
+ &print_sep);
}
void pinconf_generic_dump_config(struct pinctrl_dev *pctldev,
if (desc == NULL)
continue;
- seq_printf(s, "pin %d (%s):", pin, desc->name);
+ seq_printf(s, "pin %d (%s): ", pin, desc->name);
pinconf_dump_pin(pctldev, s, pin);
while (selector < ngroups) {
const char *gname = pctlops->get_group_name(pctldev, selector);
- seq_printf(s, "%u (%s):", selector, gname);
+ seq_printf(s, "%u (%s): ", selector, gname);
pinconf_dump_group(pctldev, s, selector, gname);
seq_printf(s, "\n");