• Mark Brown's avatar
    regulator: regulator_enable() permission checking · a18aedc2
    Mark Brown authored
    The regulator_enable() code wasn't actually checking that the
    machine constraints had given permission to enable the regulator.
    Add code to do that, but only if the regulator is not already on
    due to something like always_on or being left on at startup since
    in those cases there's no physical change being introduced and the
    constraint wouldn't make any sense.
    
    Also add matching code for disable(). We need to do less there since
    either regulator_enable() should have succeeded first or the board
    setup makes no sense.
    Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
    a18aedc2
core.c 64.1 KB