diff options
author | Javier Martinez Canillas <javier.martinez@collabora.co.uk> | 2014-11-11 13:04:44 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-26 19:42:47 +0000 |
commit | 45fc84c668ba6cc08cbae74042be838bf9283d98 (patch) | |
tree | 9008bbdf25b53ebd9bd828d2093d36b926bbee56 | |
parent | bf66c48d026d0ea20a3e04fc32fb470e692707a9 (diff) | |
download | op-kernel-dev-45fc84c668ba6cc08cbae74042be838bf9283d98.zip op-kernel-dev-45fc84c668ba6cc08cbae74042be838bf9283d98.tar.gz |
regulator: max77802: Fill regulator modes translation callback
The max77802 PMIC regulators output can be configured in one of two
modes: Output ON (normal) and Output ON in Low Power Mode. Some of
the regulators support their operating mode to be changed on startup
or by consumers when the system is running while others only support
their operating mode to be changed while the system has entered in a
suspend state.
Use the max77802_map_mode() function to translate the device specific
modes to the standard operating modes as used by the regulator core.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/max77802.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c index d076df1..0ec27cf 100644 --- a/drivers/regulator/max77802.c +++ b/drivers/regulator/max77802.c @@ -375,6 +375,7 @@ static struct regulator_ops max77802_buck_dvs_ops = { .vsel_mask = MAX77802_VSEL_MASK, \ .enable_reg = MAX77802_REG_LDO1CTRL1 + num - 1, \ .enable_mask = MAX77802_OPMODE_MASK << MAX77802_OPMODE_SHIFT_LDO, \ + .of_map_mode = max77802_map_mode, \ } /* LDOs 1, 2, 8, 15, 17, 27, 30, 35 */ @@ -393,6 +394,7 @@ static struct regulator_ops max77802_buck_dvs_ops = { .vsel_mask = MAX77802_VSEL_MASK, \ .enable_reg = MAX77802_REG_LDO1CTRL1 + num - 1, \ .enable_mask = MAX77802_OPMODE_MASK << MAX77802_OPMODE_SHIFT_LDO, \ + .of_map_mode = max77802_map_mode, \ } /* BUCKs 1, 6 */ @@ -411,6 +413,7 @@ static struct regulator_ops max77802_buck_dvs_ops = { .vsel_mask = MAX77802_DVS_VSEL_MASK, \ .enable_reg = MAX77802_REG_BUCK ## num ## CTRL, \ .enable_mask = MAX77802_OPMODE_MASK, \ + .of_map_mode = max77802_map_mode, \ } /* BUCKS 2-4 */ @@ -430,6 +433,7 @@ static struct regulator_ops max77802_buck_dvs_ops = { .enable_reg = MAX77802_REG_BUCK ## num ## CTRL1, \ .enable_mask = MAX77802_OPMODE_MASK << \ MAX77802_OPMODE_BUCK234_SHIFT, \ + .of_map_mode = max77802_map_mode, \ } /* BUCK 5 */ @@ -448,6 +452,7 @@ static struct regulator_ops max77802_buck_dvs_ops = { .vsel_mask = MAX77802_VSEL_MASK, \ .enable_reg = MAX77802_REG_BUCK5CTRL, \ .enable_mask = MAX77802_OPMODE_MASK, \ + .of_map_mode = max77802_map_mode, \ } /* BUCKs 7-10 */ @@ -466,6 +471,7 @@ static struct regulator_ops max77802_buck_dvs_ops = { .vsel_mask = MAX77802_VSEL_MASK, \ .enable_reg = MAX77802_REG_BUCK7CTRL + (num - 7) * 3, \ .enable_mask = MAX77802_OPMODE_MASK, \ + .of_map_mode = max77802_map_mode, \ } static const struct regulator_desc regulators[] = { |