MLK-19048: pinctrl: add defer probe check for pinctrl setting assertion
Pinctrl support of a device tree property "pinctrl-assert-gpios" under client device node to select function at a board level pin multiplexer. The pin route is controlled by a GPIO or i2c/spi expander GPIO. For i2c/spi expander GPIO, it may be loaded after client device that set "pinctrl-assert-gpios" property in devicetree. Then the client device's pin function doesn't work. So it should add defer probe check for the GPIO pin. Acked-by: Leonard Crestez <leonard.crestez@nxp.com> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>pull/10/head
parent
223e4c1435
commit
12b2568f68
|
@ -201,8 +201,11 @@ static int dt_gpio_assert_pinctrl(struct pinctrl *p)
|
||||||
for (;; index++) {
|
for (;; index++) {
|
||||||
gpio = of_get_named_gpio_flags(np, "pinctrl-assert-gpios",
|
gpio = of_get_named_gpio_flags(np, "pinctrl-assert-gpios",
|
||||||
index, &flags);
|
index, &flags);
|
||||||
if (gpio < 0)
|
if (gpio < 0) {
|
||||||
|
if (gpio == -EPROBE_DEFER)
|
||||||
|
return gpio;
|
||||||
break; /* End of the phandle list */
|
break; /* End of the phandle list */
|
||||||
|
}
|
||||||
|
|
||||||
if (!gpio_is_valid(gpio))
|
if (!gpio_is_valid(gpio))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue