Linux-GPIO Archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: pinconf-generic: print hex value
@ 2024-04-12  0:51 Peng Fan (OSS)
  2024-04-17  8:54 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2024-04-12  0:51 UTC (permalink / raw
  To: linus.walleij, brgl, linux-gpio, linux-kernel; +Cc: Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Hex value will be easier to match hardware register bits layout,
so same as pinconf_generic_dump_config, print hex value.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/pinctrl/pinconf-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 541c2ac9ffcb..8bfdf1e922d7 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -88,7 +88,7 @@ static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev,
 		seq_puts(s, items[i].display);
 		/* Print unit if available */
 		if (items[i].has_arg) {
-			seq_printf(s, " (%u",
+			seq_printf(s, " (0x%x",
 				   pinconf_to_config_argument(config));
 			if (items[i].format)
 				seq_printf(s, " %s)", items[i].format);
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl: pinconf-generic: print hex value
  2024-04-12  0:51 [PATCH] pinctrl: pinconf-generic: print hex value Peng Fan (OSS)
@ 2024-04-17  8:54 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2024-04-17  8:54 UTC (permalink / raw
  To: Peng Fan (OSS); +Cc: brgl, linux-gpio, linux-kernel, Peng Fan

On Fri, Apr 12, 2024 at 2:43 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:

> From: Peng Fan <peng.fan@nxp.com>
>
> Hex value will be easier to match hardware register bits layout,
> so same as pinconf_generic_dump_config, print hex value.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

I agree, and it's debugfs so not an ABI.
Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-17  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12  0:51 [PATCH] pinctrl: pinconf-generic: print hex value Peng Fan (OSS)
2024-04-17  8:54 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).