pinctrl: imx: output one pin/config pair per line in pinconf-groups
diff mbox

Message ID 1471644337-10162-1-git-send-email-vladimir_zapolskiy@mentor.com
State New
Headers show

Commit Message

Vladimir Zapolskiy Aug. 19, 2016, 10:05 p.m. UTC
cat /sys/kernel/debug/pinctrl/${pinctrl}/pinconf-groups output is
hardly readable, if a pin group contains more than one pin the output
is glued and looks like this:

  MX6Q_PAD_SD1_DAT0: 0x17071MX6Q_PAD_SD1_CMD: 0x17071MX6Q_PAD_SD1_CLK: 0x17071

Add two space indentation and a new line separator to improve
readability of the output.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
---
 drivers/pinctrl/freescale/pinctrl-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Shawn Guo Aug. 29, 2016, 3:29 a.m. UTC | #1
On Sat, Aug 20, 2016 at 01:05:37AM +0300, Vladimir Zapolskiy wrote:
> cat /sys/kernel/debug/pinctrl/${pinctrl}/pinconf-groups output is
> hardly readable, if a pin group contains more than one pin the output
> is glued and looks like this:
> 
>   MX6Q_PAD_SD1_DAT0: 0x17071MX6Q_PAD_SD1_CMD: 0x17071MX6Q_PAD_SD1_CLK: 0x17071
> 
> Add two space indentation and a new line separator to improve
> readability of the output.
> 
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>

Acked-by: Shawn Guo <shawnguo@kernel.org>

> ---
>  drivers/pinctrl/freescale/pinctrl-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
> index 71391757938b..56fd88013850 100644
> --- a/drivers/pinctrl/freescale/pinctrl-imx.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx.c
> @@ -501,7 +501,7 @@ static void imx_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
>  		ret = imx_pinconf_get(pctldev, pin->pin, &config);
>  		if (ret)
>  			return;
> -		seq_printf(s, "%s: 0x%lx", name, config);
> +		seq_printf(s, "  %s: 0x%lx\n", name, config);
>  	}
>  }
>  
> -- 
> 2.8.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Sept. 5, 2016, 10:19 p.m. UTC | #2
On Sat, Aug 20, 2016 at 12:05 AM, Vladimir Zapolskiy
<vladimir_zapolskiy@mentor.com> wrote:

> cat /sys/kernel/debug/pinctrl/${pinctrl}/pinconf-groups output is
> hardly readable, if a pin group contains more than one pin the output
> is glued and looks like this:
>
>   MX6Q_PAD_SD1_DAT0: 0x17071MX6Q_PAD_SD1_CMD: 0x17071MX6Q_PAD_SD1_CLK: 0x17071
>
> Add two space indentation and a new line separator to improve
> readability of the output.
>
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>

Patch applied with Shawn's ACK.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 71391757938b..56fd88013850 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -501,7 +501,7 @@  static void imx_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
 		ret = imx_pinconf_get(pctldev, pin->pin, &config);
 		if (ret)
 			return;
-		seq_printf(s, "%s: 0x%lx", name, config);
+		seq_printf(s, "  %s: 0x%lx\n", name, config);
 	}
 }