
2 Apr
2023
2 Apr
'23
11:33 p.m.
From: Quanyang Wang quanyang.wang@windriver.com
Sometimes a multi-element array is used for "gpio-ranges" property in dts file:
qe_pio_e: gpio-controller@1460 { ...... gpio-ranges = <&pinctrl1 0 20 10>, <&pinctrl2 10 50 20>; ...... };
But the function pinctrl_gpio_get_pinctrl_and_offset can't handle this case because the "index" argument passed to dev_read_phandle_with_args is fixed to be "0". Use a loop to traverse the array to fix it.
Signed-off-by: Quanyang Wang quanyang.wang@windriver.com --- drivers/pinctrl/pinctrl-uclass.c | 47 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 24 deletions(-)
Applied to u-boot-dm/next, thanks!