History log of /drivers/regulator/tps80031-regulator.c
Revision Date Author Comments
350ff52d409da8e081bcd79dd64d2093be896134 26-Feb-2014 Jingoo Han <jg1.han@samsung.com> regulator: tps80031: remove unnecessary parentheses

Remove unnecessary parentheses in order to fix the following
checkpatch error.

ERROR: return is not a function, parentheses are not required

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
96fa8c4b9b2c99ad6baa698c94d3fa295fa8f871 20-Feb-2014 Sachin Kamat <sachin.kamat@linaro.org> regulator: tps80031: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
0fb0c82e8135d3de9eff2a05202f6870ec378392 04-Sep-2013 Sachin Kamat <sachin.kamat@linaro.org> regulator: tps80031: Use devm_regulator_register

devm_* simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
bc49c87ec7a7695f30db73a7d73efd3566db4404 17-Apr-2013 Axel Lin <axel.lin@ingics.com> regulator: tps80031: Convert tps80031_dcdc_ops to [get|set]_voltage_sel_regmap

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
58fa6ab42c29156b2808f8db231b2ffd8fa25502 17-Apr-2013 Axel Lin <axel.lin@ingics.com> regulator: tps80031: Fix LDO2 track mode for TPS80031 or TPS80032-ES1.0

Currently we have a special code in tps80031_ldo_set_voltage_sel() to handle
LDO2 track mode for TPS80031 or TPS80032-ES1.0. The purpose is to address below
issues:

Issue description:
- LDO2 traking mode is enabled
- LDO2 tracks SMPS2 voltage.
- LDO2 automatically switch-off when LDO2_CFG_VOLTAGE is changed to some discrete values (non exhaustive list):
00011001, 00011010, 00011011, 00011100, .
- LDO2 switch-on again when LDO2_CFG_VOLTAGE is changed to other values (non exhaustive list):
00011000, 00010111, .

LDOs have reserved codes. For these codes, LDO is switch-off.

In tracking, LDO2 ref comes from SMPS2.
However LDO2 enable is still gated by LDO2 VSEL decoding.
As a result, in tracking mode LDO2 will be disabled for following code (SMPS VSEL format):
000000 & 100000 (MSB not decoded)
011001 & 111001 (MSB not decoded)
011010 & 111010 (MSB not decoded)
011100 & 111100 (MSB not decoded)
011101 & 111101 (MSB not decoded)
011110 & 111110 (MSB not decoded)

However, current code has below bugs:
1. It uses regulator_list_voltage_linear, so list_voltage() still shows above
invalid selectors have supported voltage.
2. Current code may return -EINVAL in tps80031_ldo_set_voltage_sel() for
supported voltage. This is because when we use regulator_list_voltage_linear
as list_voltage callback, regulator core will default use
regulator_map_voltage_linear(). regulator_map_voltage_linear() has an
assumption that the voltages are linear which is not true for this case.

For example,
when request voltage range is: min_uV=950000 uV && max_uV=1200000 uV
regulator_map_voltage_linear() returns the selector is 29 (0x1D),
set_voltage_sel() returns -EINVAL.
(The selector is in invalid range, 0x19 ~ 0x1f).

In above case, map_voltage() should find the lowest valid voltage within
specific range (selector = 0x20) and set_voltage_sel() should successfully
set the voltage to 987500 uV.

This patch fixes these issues by:
1. Add checking valid setting for LDO2 track mode of TPS80031 or TPS80032-ES1.0
in list_voltage. So it returns -EINVAL for invalid selectors.
2. Implement tps80031_ldo_map_voltage, use regulator_map_voltage_iterate()
to find the lowest voltage within specific range for TPS80031 or
TPS80032-ES1.0. This is required when the voltage map is no longer linear.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
d4cbca9ef822e05d4b55e7d0f1cdfded7a472a56 25-Jan-2013 Axel Lin <axel.lin@ingics.com> regulator: tps80031: Use IS_ERR to check return value of regulator_register()

regulator_register() does not return NULL, it returns ERR_PTR on error.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
7fa8a5975784cce646b3763e5d9957f8d688c9ce 06-Dec-2012 Axel Lin <axel.lin@ingics.com> regulator: tps80031: Convert tps80031_ldo_ops to linear_min_sel and list_voltage_linear

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
bf0caae3036563ef84d1dcb7b2c7fcbda59a889d 23-Nov-2012 Axel Lin <axel.lin@ingics.com> regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators

Implement list_voltage for fixed regulators, otherwise
regulator_is_supported_voltage() returns 0.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1a7ae58e2c5feb2c0f35e773223949a8fa672433 22-Nov-2012 Axel Lin <axel.lin@ingics.com> regulator: tps80031: Trivial cleanups

This patch includes below cleanups:

- Fix typo in comment
- Fix showing wrong register in dev_err
- Remove unnecessary rinfo variable
- Add TPS80032 to MODULE_DESCRIPTION

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
8dc995f56ef7aedb41873fdeaa1971f3aa166ebd 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> regulator: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
a5023574d120ca3b9337cedd4e27de90cae9aff7 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> regulator: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
5eb9f2b96381ac3fa4a5910c37213c1cb62e9c65 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> regulator: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
b92f787d1479ffbf6350114a7353e2fd32cafc41 14-Nov-2012 Laxman Dewangan <ldewangan@nvidia.com> regulator: tps80031: add prefix TPS80031 on common defines.

Pefix "TPS80031" is added on all defines of tps80031 header
to avoid conflict with other header definitions.
Update the regualtor driver of tps80031 to use the same name.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1a0bb679bcee5233dc5134e4f5fbf97d8caf8bbb 11-Nov-2012 Laxman Dewangan <ldewangan@nvidia.com> regulator: tps80031: add regulator driver for tps80031

Add regulator driver for Texas Instrument TPS80031/TPS80032 device.
TPS80031/ TPS80032 Fully Integrated Power Management with Power
Path and Battery Charger. It has 5 configurable step-down
converters, 11 general purpose LDOs, VBUS generator and digital
output to control regulators.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>