summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/da9052-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'regulator/topic/of' into regulator-nextMark Brown2013-02-191-2/+3
|\
| * regulator: Add missing of_node_put()Axel Lin2013-01-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | of_find_node_by_name() returns a node pointer with refcount incremented, use of_node_put() on it when done. of_find_node_by_name() will call of_node_put() against from parameter, thus we also need to call of_node_get(from) before calling of_find_node_by_name(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | regulator: da9052: Use apply_[reg|bit] with regmap based voltage_sel operationsAxel Lin2012-12-241-35/+6
|/ | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'regulator/topic/hotplug' into regulator-nextMark Brown2012-12-101-3/+3
|\
| * regulator: remove use of __devexitBill Pemberton2012-11-201-1/+1
| | | | | | | | | | | | | | | | 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>
| * regulator: remove use of __devinitBill Pemberton2012-11-201-1/+1
| | | | | | | | | | | | | | | | 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>
| * regulator: remove use of __devexit_pBill Pemberton2012-11-201-1/+1
| | | | | | | | | | | | | | | | 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>
* | regulator: da9052: Ensure setting current limit within specific rangeAxel Lin2012-11-271-5/+5
|/ | | | | | | | Checking da9052_current_limits[row][i] <= max_uA is not enough, it is possible da9052_current_limits[row][i] may less than the requested min_uA. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: set_current_limit should select the maximum current in ↵Axel Lin2012-08-281-2/+2
| | | | | | | specific range Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: initialize of_node param for regulator registerAxel Lin2012-07-121-0/+1
| | | | | | | | Initialize config.of_node for regulator before registering. This is needed for DT based regulator support. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: Use for_each_child_of_node() macroAxel Lin2012-07-091-2/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: Convert to set_voltage_sel and map_voltageAxel Lin2012-05-161-13/+24
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'regulator/topic/drivers' into regulator-nextMark Brown2012-05-121-1/+2
|\ | | | | | | | | Conflicts: drivers/regulator/88pm8607.c (simple overlap with a bugfix in v3.4)
| * regulator: da9052: fix bug in device tree iteration loopYing-Chun Liu (PaulLiu)2012-05-071-1/+1
| | | | | | | | | | | | | | | | The driver of da9052 is buggy due to the iteration loop of device tree. This patch fix the loop condition to make the driver work with device tree. Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: da9052: Directly include of.hMark Brown2012-04-161-0/+1
| | | | | | | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | regulator: da9052: Use regulator_get_voltage_sel_regmap()Axel Lin2012-05-041-24/+8
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | regulator: da9052: Use generic regmap enable/disable operationsAxel Lin2012-04-231-45/+11
|/ | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: add device tree supportYing-Chun Liu (PaulLiu)2012-04-131-1/+28
| | | | | | | | | | | | This patch adds device tree support for dialog regulators Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@ti.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Ashish Jangam <ashish.jangam@kpitcummins.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Use a struct to pass in regulator runtime configurationMark Brown2012-04-091-3/+7
| | | | | | | | | | | | | | Rather than adding new arguments to regulator_register() every time we want to add a new bit of dynamic information at runtime change the function to take these via a struct. By doing this we avoid needing to do further changes like the recent addition of device tree support which required each regulator driver to be updated to take an additional parameter. The regulator_desc which should (mostly) be static data is still passed separately as most drivers are able to configure this statically at build time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: Remove unneeded devm_kfree callsAxel Lin2012-04-051-10/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Refactor to use one da9052_ldo_ops/da9052_dcdc_ops for all LDOs/DCDCsAxel Lin2012-04-011-186/+44
| | | | | | | | | | | | | | | | | | In current implementation, da9052_ldo_ops and da9052_ldo5_6_ops are very similar, only the set_voltage is slightly different. da9052_buckperi_ops and da9052_dcdc_ops are also similar. This patch adds da9052_regulator_set_voltage for the set_voltage callback used by all LDOs and DCDCs. Rework da9052_get_regulator_voltage_sel and da9052_set_dcdc_voltage to make it possible to be shared by all DCDCs. Rework da9052_list_voltage to make it to be shared by all DCDCs and LDOs. Then we can remove da9052_ldo5_6_ops and da9052_buckperi_ops. We can also remove DA9052_LDO5_6 and DA9052_BUCKPERI macros which is not used now. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Fix da9052 ldo regulator namesAxel Lin2012-04-011-40/+52
| | | | | | | | The regulator name for LDOs are LDO4 ... LDO13 in current implementation. The correct regulator name for LDOs should be LDO1 ... LDO10. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: Ensure the selected voltage falls within the specified rangeAxel Lin2012-03-111-4/+4
| | | | | | | | 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>
* regulator: Set n_voltages for da9052 regulatorsAxel Lin2012-03-111-0/+4
| | | | | | | 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>
* regulator: Fix mask parameter in da9052_reg_update callsAxel Lin2012-03-051-4/+4
| | | | | | | | 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>
* regulator: da9052: Staticize non-exported symbolsAxel Lin2011-12-201-2/+2
| | | | | | | | 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>
* regulator: Replace kzalloc with devm_kzalloc and if-else with a switch-case ↵Ashish Jangam2011-12-171-5/+11
| | | | | | | | | 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>
* regulator: Update da9052-regulator for DT changesMark Brown2011-12-151-1/+1
| | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: DA9052/53 Regulator supportAshish Jangam2011-12-151-0/+600
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>
OpenPOWER on IntegriCloud