aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2014-06-04 15:34:31 -0400
committerMark Brown <broonie@linaro.org>2014-06-05 07:40:51 -0400
commit6b7f2d82d5dc30fd4a31faf44f701b683c28715e (patch)
tree5344d7072f00445f46dc441f1a06474616670d3b /drivers/regulator
parent978371cbabb4cb7a47751049d72f06dc8348cab2 (diff)
regulator: palmas: Fix SMPS list for 0V
get_voltage_sel reads from SMPS register - if the read selector value is 0, the SMPS is actually disabled - So, this is in addition to the ctrl_register that may also be used to enable/disable the SMPS. The original logic(prior to commit dbabd624d4eec50b6) used to be: static int palmas_map_voltage_smps(struct regulator_dev *rdev, int min_uV, int max_uV) <snip> if (min_uV == 0) return 0; To handle this scenario, with the transition to regulator_list implementation, we seem to have missed the data necessary to mark as one of the valid entries as "0" 'disabled regulator' which results in 0 volts - So, stick with pre-existing logic. Without this added to the list, palmas regulator driver, on probe, attempts to setup constraints and in the case of OMAP5uEVM, SMPS9 (which is mapped for 2v1 audio supply) fails in regulator_list_voltage_linear_range mapping of '0', and as a fall back of constraints not being applied, the entire regulator list is not enumerated due to assumption that something system wide has gone bad on with the PMIC. Fixes: dbabd624d4eec50b6 ("regulator: palmas: Reemove open coded functions with helper functions") Reported-by: Olof Johansson <olof@lixom.net> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/palmas-regulator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 864ed02ce4b7..b982f0ff4e01 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -37,12 +37,14 @@ struct regs_info {
37}; 37};
38 38
39static const struct regulator_linear_range smps_low_ranges[] = { 39static const struct regulator_linear_range smps_low_ranges[] = {
40 REGULATOR_LINEAR_RANGE(0, 0x0, 0x0, 0),
40 REGULATOR_LINEAR_RANGE(500000, 0x1, 0x6, 0), 41 REGULATOR_LINEAR_RANGE(500000, 0x1, 0x6, 0),
41 REGULATOR_LINEAR_RANGE(510000, 0x7, 0x79, 10000), 42 REGULATOR_LINEAR_RANGE(510000, 0x7, 0x79, 10000),
42 REGULATOR_LINEAR_RANGE(1650000, 0x7A, 0x7f, 0), 43 REGULATOR_LINEAR_RANGE(1650000, 0x7A, 0x7f, 0),
43}; 44};
44 45
45static const struct regulator_linear_range smps_high_ranges[] = { 46static const struct regulator_linear_range smps_high_ranges[] = {
47 REGULATOR_LINEAR_RANGE(0, 0x0, 0x0, 0),
46 REGULATOR_LINEAR_RANGE(1000000, 0x1, 0x6, 0), 48 REGULATOR_LINEAR_RANGE(1000000, 0x1, 0x6, 0),
47 REGULATOR_LINEAR_RANGE(1020000, 0x7, 0x79, 20000), 49 REGULATOR_LINEAR_RANGE(1020000, 0x7, 0x79, 20000),
48 REGULATOR_LINEAR_RANGE(3300000, 0x7A, 0x7f, 0), 50 REGULATOR_LINEAR_RANGE(3300000, 0x7A, 0x7f, 0),