• Linus Walleij's avatar
    regulator/gpio: Allow nonexclusive GPIO access · b0ce7b29
    Linus Walleij authored
    This allows nonexclusive (simultaneous) access to a single
    GPIO line for the fixed regulator enable line. This happens
    when several regulators use the same GPIO for enabling and
    disabling a regulator, and all need a handle on their GPIO
    This solution with a special flag is not entirely elegant
    and should ideally be replaced by something more careful as
    this makes it possible for several consumers to
    enable/disable the same GPIO line to the left and right
    without any consistency. The current use inside the regulator
    core should however be fine as it takes special care to
    handle this.
    For the state of the GPIO backend, this is still the
    lesser evil compared to going back to global GPIO
    Cc: Marek Szyprowski <m.szyprowski@samsung.com>
    Cc: Jon Hunter <jonathanh@nvidia.com>
    Fixes: efdfeb07 ("regulator: fixed: Convert to use GPIO descriptor only")
    Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
    Tested-by: default avatarJon Hunter <jonathanh@nvidia.com>
    Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
fixed.c 6.5 KB