linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: pinctrl-zynqmp: Use pin numbers stored in pin descriptor
@ 2024-05-27 10:57 Michal Simek
  2024-05-29  7:36 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2024-05-27 10:57 UTC (permalink / raw)
  To: linux-kernel, monstr, michal.simek, git
  Cc: Swati Agarwal, Linus Walleij,
	moderated list:ARM/ZYNQ ARCHITECTURE,
	open list:PIN CONTROL SUBSYSTEM

From: Swati Agarwal <swati.agarwal@amd.com>

Use pin numbers stored in the pin descriptors instead of index value while
creating the pin groups. Pin Id's are not same as Index values for Xilinx
Versal platform, so use the pin values from descriptor which works for both
ZynqMP and Versal platforms.

Signed-off-by: Swati Agarwal <swati.agarwal@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
---

 drivers/pinctrl/pinctrl-zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c
index 5c46b7d7ebcb..1ea0353767b7 100644
--- a/drivers/pinctrl/pinctrl-zynqmp.c
+++ b/drivers/pinctrl/pinctrl-zynqmp.c
@@ -718,7 +718,7 @@ static int zynqmp_pinctrl_prepare_group_pins(struct device *dev,
 	int ret;
 
 	for (pin = 0; pin < zynqmp_desc.npins; pin++) {
-		ret = zynqmp_pinctrl_create_pin_groups(dev, groups, pin);
+		ret = zynqmp_pinctrl_create_pin_groups(dev, groups, zynqmp_desc.pins[pin].number);
 		if (ret)
 			return ret;
 	}
-- 
2.40.1


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

* Re: [PATCH] pinctrl: pinctrl-zynqmp: Use pin numbers stored in pin descriptor
  2024-05-27 10:57 [PATCH] pinctrl: pinctrl-zynqmp: Use pin numbers stored in pin descriptor Michal Simek
@ 2024-05-29  7:36 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2024-05-29  7:36 UTC (permalink / raw)
  To: Michal Simek
  Cc: linux-kernel, monstr, michal.simek, git, Swati Agarwal,
	moderated list:ARM/ZYNQ ARCHITECTURE,
	open list:PIN CONTROL SUBSYSTEM

On Mon, May 27, 2024 at 12:57 PM Michal Simek <michal.simek@amd.com> wrote:

> From: Swati Agarwal <swati.agarwal@amd.com>
>
> Use pin numbers stored in the pin descriptors instead of index value while
> creating the pin groups. Pin Id's are not same as Index values for Xilinx
> Versal platform, so use the pin values from descriptor which works for both
> ZynqMP and Versal platforms.
>
> Signed-off-by: Swati Agarwal <swati.agarwal@amd.com>
> Signed-off-by: Michal Simek <michal.simek@amd.com>

Patch applied!

Yours,
Linus Walleij

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

end of thread, other threads:[~2024-05-29  7:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27 10:57 [PATCH] pinctrl: pinctrl-zynqmp: Use pin numbers stored in pin descriptor Michal Simek
2024-05-29  7:36 ` 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).