• Mark Brown's avatar
    regulator: core: Add core support for GPIO controlled enable lines · 65f73508
    Mark Brown authored
    It is very common for regulators to support having their enable signal
    controlled by a GPIO. Since there are a bunch of fiddly things to get
    right like handling the operations when the enable signal is tied to
    a rail and it's just replicated code add support for this to the core.
    
    Drivers should set ena_gpio in their config if they have a GPIO control,
    using ena_gpio_flags to specify any flags (including GPIOF_OUT_INIT_ for
    the initial state) and ena_gpio_invert if the GPIO is active low. The
    core will then override any enable and disable operations the driver has
    and instead control the specified GPIO.
    
    This will in the future also allow us to further extend the core by
    identifying when several enable signals have been tied together and
    handling this properly.
    Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    65f73508
driver.h 10.9 KB