1
0
Fork 0

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
Andy Duan 2018-07-26 18:48:03 +08:00 committed by Jason Liu
parent 223e4c1435
commit 12b2568f68
1 changed files with 4 additions and 1 deletions

View File

@ -201,8 +201,11 @@ static int dt_gpio_assert_pinctrl(struct pinctrl *p)
for (;; index++) {
gpio = of_get_named_gpio_flags(np, "pinctrl-assert-gpios",
index, &flags);
if (gpio < 0)
if (gpio < 0) {
if (gpio == -EPROBE_DEFER)
return gpio;
break; /* End of the phandle list */
}
if (!gpio_is_valid(gpio))
return -EINVAL;