Skip to content
  • Charles Keepax's avatar
    regulator: arizona-ldo1: Fix handling of GPIO 0 · ce938001
    Charles Keepax authored
    The LDO1 driver is using the arizona_of_get_named_gpio helper function
    which will return 0 if an error was encountered whilst parsing the GPIO,
    as under the pdata scheme 0 was not being treated as a valid GPIO.
    However, since the regulator framework was expanded to allow the use of
    GPIO 0 this causes us to attempt to register GPIO 0 when we encountered
    an error parsing the device tree.
    
    This patch uses of_get_named_gpio directly and sets the
    ena_gpio_initialized flag based on the return value.
    
    Fixes: 1de3821a
    
     ("regulator: Set ena_gpio_initialized in regulator drivers")
    Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    ce938001