Regulator: DA9052 regulator support v2
PATCH 5/11 Regulator: DA9052 regulator support v2
The DA9052 PMIC has below featured regulators:-
4 DVS Buck converters 0.5V - 3.6V upto 1Amp.
10 Programmable LDO's High PSSR, 1% accuracy.
This patch support all the DA9052 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.
---
Changes since v2
- Check for current min_uA < 700000
- Corrected current conversions from mA to uA
--- drivers/regulator/Kconfig | 7 + drivers/regulator/Makefile | 1 + drivers/regulator/da9052-regulator.c | 544 ++++++++++++++++++++++++++++++++++ 3 files changed, 552 insertions(+), 0 deletions(-) create mode 100755 drivers/regulator/da9052-regulator.c
drivers/regulator/Kconfig +7 -0
@@ -167,6 +167,13 @@ config REGULATOR_DA903X Say y here to support the BUCKs and LDOs regulators found on Dialog Semiconductor DA9030/DA9034 PMIC. +config REGULATOR_DA9052 + tristate "Dialog DA9052 regulators" + depends on PMIC_DA9052 + help + Say y here to support the BUCKs and LDOs regulators found on + Dialog Semiconductor DA9052 PMIC. + config REGULATOR_PCF50633 tristate "PCF50633 regulator driver" depends on MFD_PCF50633
drivers/regulator/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o obj-$(CONFIG_REGULATOR_TPS6586X) += tps6586x-regulator.o obj-$(CONFIG_REGULATOR_DA903X) += da903x.o +obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
drivers/regulator/da9052-regulator.c new file +544 -0
544 lines not on this page · raw message
If there are no comments then can you please Ack this patch.
Quoted 16 lines · On Wed, 2011-06-29 at 18:46 +0530, ashishj3 wrote:
The DA9052 PMIC has below featured regulators:-
4 DVS Buck converters 0.5V - 3.6V upto 1Amp.
10 Programmable LDO's High PSSR, 1% accuracy.This patch support all the DA9052 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 <[email protected]>Signed-off-by Ashish Jangam <[email protected]>CC Mark Brown <[email protected]>---
Changes since v2
- Check for currentmin_uA< 700000
- Corrected current conversions from mA to uA
---
drivers/regulator/da9052-regulator.c line 64
Quoted 7 lines · On Wed, Jun 29, 2011 at 06:46:03PM +0530, ashishj3 wrote:
drivers/regulator/da9052-regulator.c new file +7
-0+static int verify_range (struct da9052_regulator_info *info, +int min_uV,int max_uV) +{ +if (min_uV < info->min_uV || min_uV > info->max_uV) +return -EINVAL ; +if (max_uV < info->min_uV || max_uV > info->max_uV) +return -EINVAL ;
This is broken, think about what it's trying to do - it's trying to check that the regulator can deliver a voltage within the requested range. These checks don't help with that.