• Janusz Krzysztofik's avatar
    ARM: OMAP1: ams-delta: set up regulator over modem reset GPIO pin · ac2885df
    Janusz Krzysztofik authored
    The Amstrad Delta on-board latch2 bit named MODEM_NRESET, now available
    as a GPIO pin AMS_DELTA_GPIO_PIN_NMODEM_RESET, is used to power up/down
    (bring into/out of a reset state) two distinct on-board devices
    simultaneously: the modem, and the voice codec. As a consequence, that
    bit is, or can be, manipulated concurrently by two drivers, or their
    platform provided hooks.
    
    Instead of updating those drivers to use the gpiolib API as a new method
    of controlling the MODEM_NRESET pin state, like it was done to other
    drivers accessing latch2 pins, and still being vulnerable to potential
    concurrency conflicts, or trying to solve that sharing issue with a
    custom piece of code, set up a fixed regulator device on top of that
    GPIO pin, with the intention of updating both drivers to manipulate that
    regulator, not the GPIO pin directly.
    
    Before the ASoC driver is updated and the modem platform data expanded
    with a power management callback for switching its power, the
    ams_delta_latch_write() function, which still provides the old API for
    accessing latch2 functionality from not updated drivers, is modified to
    toggle the regulator instead of the MODEM_NRESET GPIO pin.  A helper
    function provided for balancing the regulator enable/disable operations,
    together with the consumer data needed for tracking the regulator state,
    will be removed once the drivers are updated.
    
    Depends on patch series "ARM: OMAP1: ams-delta: replace custom I/O with
    GPIO".
    Signed-off-by: default avatarJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    ac2885df
Kconfig 4.58 KB