• J
    regulator: max77802: Add .set_suspend_{enable,disable} callbacks · e6fb2aac
    Javier Martinez Canillas 提交于
    The max77802 PMIC has an enable pin (PWRREQ) that can be used to switch
    regulators ON and OFF automatically by the Application Processor when
    the system is leaving and entering sleep mode.
    
    Only the BUCKs regulators had a .set_suspend_disable function handler
    that used the enable pin to turn OFF the regulators during suspend.
    
    But most LDOs also support that functionality (besides 1, 3, 20 and 21)
    so rename the function to a more generic name and use the same function
    for the LDOs. Also add a .set_suspend_enable handler for all regulators
    and use the same function used for the .enable operation.
    
    Finally, don't treat output ON/OFF controlled by PWRREQ as an operating
    mode using the ambiguous MAX77802_OPMODE_STANDBY since it's not an opmode.
    Instead make it clear that is a control value to switch the regulator OFF
    by PWRREQ when the system is entering in a suspend state.
    Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
    Signed-off-by: NMark Brown <broonie@kernel.org>
    e6fb2aac
max77802.c 17.5 KB