Commit 50287367 authored by Swati Agarwal's avatar Swati Agarwal Committed by Linus Walleij
Browse files

pinctrl: pinctrl-zynqmp: Use pin numbers stored in pin descriptor



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: default avatarSwati Agarwal <swati.agarwal@amd.com>
Signed-off-by: default avatarMichal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/2413a1f99278d70313960f13daecda9ef54172d8.1716807432.git.michal.simek@amd.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 0a2bcac1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}