• Carlo Caione's avatar
    regulator: helpers: Modify helpers enabling multi-bit control · ca5d1b35
    Carlo Caione authored
    This patch extends the regulator helpers to account for device that use
    multiple bits for control when using regmap enable/disable/bypass ops.
    
    The actual regulator helpers wrongly assume that the regulator control
    is always performed using single bits, using in the regulator_desc
    struct only two parameters *_reg and *_mask defining register and mask
    for control.
    
    This patch extends this struct and introduces the helpers to take into
    account devices where control is performed using multiple bits and
    specific multi-bit values are used for enabling/disabling/bypassing the
    regulator.
    Signed-off-by: default avatarCarlo Caione <carlo@caione.org>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    ca5d1b35
driver.h 14.3 KB