Commit Graph

7 Commits (024e1e4dcde98eff0fa5bf2881e4b304c147bd86)

Author SHA1 Message Date
Axel Lin 9365121869 regulator: da9052: Ensure the selected voltage falls within the specified range
Integer division may truncate the result, use DIV_ROUND_UP to ensure the
selected voltage falls within the specified range.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11 20:39:10 +00:00
Axel Lin 7b95765495 regulator: Set n_voltages for da9052 regulators
The n_voltages setting for all LDOs and DCDCs are missing in current code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11 20:39:04 +00:00
Axel Lin 4adf9beda5 regulator: Fix mask parameter in da9052_reg_update calls
If the mask parameter is 0, info->activate_bit bit won't be set by
calling da9052_reg_update.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-05 12:28:58 +00:00
Axel Lin 6242eae9bc regulator: da9052: Staticize non-exported symbols
da9052_regulator_info and da9053_regulator_info are not used outside
this driver so no need to make the symbol global.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:02:48 +00:00
Ashish Jangam 984b5a6ba5 regulator: Replace kzalloc with devm_kzalloc and if-else with a switch-case for da9052-regulator
Reported-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:25:47 +00:00
Mark Brown 47aed92c77 regulator: Update da9052-regulator for DT changes
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-15 15:03:38 +08:00
Ashish Jangam 08bf1c0ae9 regulator: DA9052/53 Regulator support
The Dialog PMIC has below featured regulators:-
DA9052-BC - 4 DVS Buck converters 0.5V - 3.6V upto 1Amp.
DA9053-AA/BX - 4 DVS Buck converters 0.5V - 2.5V upto 3Amp.
DA9052/53 - 10 Programmable LDO's High PSSR, 1% accuracy.

This patch support all the DA9052 and Da9053 regulators. The output voltages are
fully programmable via I2C or SPI interface. The platform data with regulation
constraints is passed down from the board to the regulator.

Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Tested-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-15 02:00:10 +08:00