diff mbox series

pinctrl: pinconf-generic: print hex value

Message ID 20240412005128.2937486-1-peng.fan@oss.nxp.com
State New
Headers show
Series pinctrl: pinconf-generic: print hex value | expand

Commit Message

Peng Fan (OSS) April 12, 2024, 12:51 a.m. UTC
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(-)

Comments

Linus Walleij April 17, 2024, 8:54 a.m. UTC | #1
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
diff mbox series

Patch

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);