linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: ocelot: correct pincfg regmap max_register
@ 2022-07-13 22:51 Robert Marko
  2022-07-13 22:51 ` [PATCH 2/2] pinctrl: ocelot: fix pinconf Robert Marko
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Marko @ 2022-07-13 22:51 UTC (permalink / raw)
  To: linus.walleij, colin.foster, linux-gpio, linux-kernel; +Cc: Robert Marko

Commit "pinctrl: ocelot: convert pinctrl to regmap" set the pincfg regmap
max_register to 32 which is incorrect as there are 64 pins in total.

Actual register space length is 0x100, which matches the DTS and can
actually fit one register per pin with stride of 4.

So, correct the max_register to 0xfc.

Fixes: 076d9e71bcf8 ("pinctrl: ocelot: convert pinctrl to regmap")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 drivers/pinctrl/pinctrl-ocelot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 349e063a04fa..84bfbe649b67 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1899,7 +1899,7 @@ static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev)
 		.reg_bits = 32,
 		.val_bits = 32,
 		.reg_stride = 4,
-		.max_register = 32,
+		.max_register = 0xfc,
 		.name = "pincfg",
 	};
 
-- 
2.36.1


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

end of thread, other threads:[~2022-07-18  9:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13 22:51 [PATCH 1/2] pinctrl: ocelot: correct pincfg regmap max_register Robert Marko
2022-07-13 22:51 ` [PATCH 2/2] pinctrl: ocelot: fix pinconf Robert Marko
2022-07-14  6:01   ` Colin Foster
2022-07-13 23:09     ` Robert Marko
     [not found]     ` <CA+HBbNHwbPtxGYW=xnay7zW9nxUgu5EURy6nX9m2rkTPdSELLw@mail.gmail.com>
2022-07-14  6:20       ` Colin Foster
2022-07-18  9:25       ` 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 NNTP newsgroup(s).