regulator: s2mps11: Implement set_ramp_rate callback for bucks

Implementing set_ramp_rate() and using standard constraints for getting
ramp_delay and ramp_disable, instead of getting it as s2mps11 specific data
through platform data, makes driver more compliant with framework and reduces
the complexity for adding DT support.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Yadwinder Singh Brar
2013-06-29 18:21:16 +05:30
committed by Mark Brown
parent 92d8ecae7e
commit 939c02777a
2 changed files with 128 additions and 0 deletions

View File

@@ -191,6 +191,17 @@ enum s2mps11_regulators {
#define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1)
#define S2MPS11_RAMP_DELAY 25000 /* uV/us */
#define S2MPS11_BUCK2_RAMP_SHIFT 6
#define S2MPS11_BUCK34_RAMP_SHIFT 4
#define S2MPS11_BUCK5_RAMP_SHIFT 6
#define S2MPS11_BUCK16_RAMP_SHIFT 4
#define S2MPS11_BUCK7810_RAMP_SHIFT 2
#define S2MPS11_BUCK9_RAMP_SHIFT 0
#define S2MPS11_BUCK2_RAMP_EN_SHIFT 3
#define S2MPS11_BUCK3_RAMP_EN_SHIFT 2
#define S2MPS11_BUCK4_RAMP_EN_SHIFT 1
#define S2MPS11_BUCK6_RAMP_EN_SHIFT 0
#define S2MPS11_PMIC_EN_SHIFT 6
#define S2MPS11_REGULATOR_MAX (S2MPS11_REG_MAX - 3)