• Haojian Zhuang's avatar
    pinctrl: check pinctrl ready for gpio range · 51e13c24
    Haojian Zhuang authored
    pinctrl_get_device_gpio_range() only checks whether a certain GPIO pin
    is in gpio range. But maybe some GPIO pins don't have back-end pinctrl
    interface, it means that these pins are always configured as GPIO
    function. For example, gpio159 isn't related to back-end pinctrl device
    in Hi3620 while other GPIO pins are related to back-end pinctrl device.
    
    Append pinctrl_ready_for_gpio_range() that is used to check whether
    pinctrl device with GPIO range is ready. This function will be called
    after pinctrl_get_device_gpio_range() fails.
    
    If pinctrl device with GPIO range is found, it means that pinctrl device
    is already launched and a certain GPIO pin just don't have back-end pinctrl
    interface. Then pinctrl_request_gpio() shouldn't return -EPROBE_DEFER in
    this case.
    Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@linaro.org>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    51e13c24
core.c 40.8 KB