summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
Commit message (Collapse)AuthorAgeFilesLines
* regulator: db8500-prcmu: Separate regulator registration from probeLee Jones2012-05-181-27/+44
| | | | | | | | | This will provide us with a convenient way to register regulators when booting with Device Tree both enabled & disabled and will save us a great deal of code duplication in time. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab3100: Use regulator_map_voltage_iterate()Axel Lin2012-05-181-34/+1
| | | | | | | | | | | | regulator_map_voltage_iterate() is for drivers implementing set_voltage_sel() and list_voltage() to use it as their map_voltage() operation. In this case, regulator_map_voltage_iterate() happen to be doing the same thing as ab3100_get_best_voltage_index() function. So we can use it to replace ab3100_get_best_voltage_index() function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65217: Convert to set_voltage_sel and map_voltageAxel Lin2012-05-181-38/+30
| | | | | | | | | | Convert tps65217_pmic_ops to use set_voltage_sel and map_voltage. After this convertion, we can also use tps65217_pmic_set_voltage_sel() for set_voltage_sel callback of tps65217_pmic_ldo1_ops. Thus this patch also removes tps65217_pmic_ldo1_set_voltage_sel() function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Enable the ab8500 for Device TreeLee Jones2012-05-181-0/+54
| | | | | | | | | | | Here we setup the ab8500 regulator driver for DT. We first do this in the normal way, by providing a match structure during initialisation, but then we provide information so that whilst probing we can use existing data structures to do DT look-ups. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Split up probe() into manageable piecesLee Jones2012-05-181-63/+87
| | | | | | | | | | | | ab8500's probe() function is becoming quite large, so in the lead up to Device Tree enablement which will fork the thread of execution this patch splits it into 3 main areas; basic error checking will remain in probe(), but regulator register initialisation and regulator registration have been moved to their own functions which will be called in sequence by probe() and the DT equivalent. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8925: Remove check_range function and max_uV from struct ↵Axel Lin2012-05-171-12/+0
| | | | | | | | | | | | rc5t583_regulator_info This driver has been converted to use regulator_map_voltage_linear and set_voltage_sel now. regulator_map_voltage_linear will check the the voltage falls within specified range. The check_range() function and max_uV field are not used now, remove them. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8649: Remove unused check_range() functionAxel Lin2012-05-171-10/+0
| | | | | | | | | This driver has been converted to use regulator_map_voltage_linear and set_voltage_sel now. regulator_map_voltage_linear will check the the voltage falls within specified range. The check_range() function is not used, remove it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: rc5t583: Remove max_uV from struct rc5t583_regulator_infoAxel Lin2012-05-171-4/+0
| | | | | | | | | This driver has been converted to set_voltage_sel and regulator_map_voltage_linear. regulator_map_voltage_linear will check the voltage falls within specified range. The max_uV field is not used now, remove it. 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>
* regulator: max8952: Use devm_kzallocAxel Lin2012-05-161-8/+3
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: isl6271a: Convert to set_voltage_sel and regulator_map_voltage_linearAxel Lin2012-05-161-15/+6
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: isl6271a: Convert to get_voltage_selAxel Lin2012-05-161-12/+5
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: isl6271a: Use regulator_list_voltage_linear()Axel Lin2012-05-161-6/+3
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8660: Convert to set_voltage_sel and regulator_map_voltage_linearAxel Lin2012-05-151-56/+15
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8660: Convert to get_voltage_selAxel Lin2012-05-151-11/+12
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8660: Convert to regulator_list_voltage_linear()Axel Lin2012-05-151-27/+16
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da903x: Kill da903x_[get|set]_[ldo12|ldo14]_voltage_sel() functionsAxel Lin2012-05-151-67/+6
| | | | | | | | | | | | | Now the implementation of da903x_set_voltage_sel, da9030_set_ldo14_voltage_sel, and da9034_set_ldo12_voltage_sel are exactly the same. da903x_get_voltage_sel, da9030_get_ldo14_voltage_sel and da9034_get_ldo12_voltage_sel are exactly the same. So we can use da903x_[get|set]_voltage_sel and kill other functions. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da903x: Convert to set_voltage_sel and map_voltageAxel Lin2012-05-151-56/+54
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da903x: Convert to regulator_list_voltage_linear()Axel Lin2012-05-151-33/+21
| | | | | | | Use regulator_list_voltage_linear() to replace da903x_list_voltage(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: support force PWM mode via regulator modeLaxman Dewangan2012-05-141-37/+65
| | | | | | | | | | Change the mechanism of enabling the force PWM mode through regulator set mode. This can be dynamically configured now. In the REGULATOR_MODE_FAST the force PWM is enabled and in REGULATOR_MODE_NORMAL the force PWM is disabled. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: rc5t583: Convert to regulator_set_voltage_sel_regmap and ↵Axel Lin2012-05-141-27/+2
| | | | | | | | regulator_map_voltage_linear Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: rc5t583: Convert to regulator_list_voltage_linear()Axel Lin2012-05-141-19/+9
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8649: Convert to regulator_set_voltage_sel_regmap and ↵Axel Lin2012-05-141-20/+2
| | | | | | | regulator_map_voltage_linear Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8649: Convert to regulator_list_voltage_linear()Axel Lin2012-05-141-7/+4
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8649: Use regulator_get_voltage_sel_regmap()Axel Lin2012-05-141-29/+16
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8649: Convert to get_voltage_selAxel Lin2012-05-141-3/+3
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: Fix build error due to missing semicolonAxel Lin2012-05-141-1/+1
| | | | | | | | | | | | | Fix below build error: CC [M] drivers/regulator/tps62360-regulator.o drivers/regulator/tps62360-regulator.c:351:1: error: expected ',' or ';' before 'extern' make[2]: *** [drivers/regulator/tps62360-regulator.o] Error 1 make[1]: *** [drivers/regulator] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8994: Allow registration with no platform dataMark Brown2012-05-141-4/+2
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Don't open code _regulator_is_enabled()Mark Brown2012-05-141-3/+2
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* regulator: wm831x-dcdc: Add missing checks for pdata before useMark Brown2012-05-141-2/+3
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8925: Convert to set_voltage_sel() and map_voltage()Axel Lin2012-05-141-15/+8
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8925: Convert to regulator_list_voltage_linear()Axel Lin2012-05-141-17/+8
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8925: Convert to get_voltage_selAxel Lin2012-05-141-4/+4
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Release regulator-regulator supplies on errorMark Brown2012-05-141-0/+2
| | | | | | | | | If we fail while registering a regulator make sure we release the supply for the regulator if there is one. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@vger.kernel.org
* regulator: tps62360: Convert to set_voltage_sel and regulator_map_voltage_linearAxel Lin2012-05-141-17/+7
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: Convert to regulator_list_voltage_linear()Axel Lin2012-05-141-14/+6
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Ensure simple linear voltage mappings falls within the ↵Axel Lin2012-05-141-1/+1
| | | | | | | | | | | specified range Integer division may truncate the result. Use DIV_ROUND_UP to ensure simple linear voltage mappings falls within the specified range. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: add dt supportLaxman Dewangan2012-05-131-1/+72
| | | | | | | | | | Add dt support for the pmu device tps62360 and Add binding documentation with example. With this patch driver will support both device-tree and non-device tree registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: make init_data of platform data to pointer.Laxman Dewangan2012-05-131-1/+1
| | | | | | | | | | | Convert platform data member regulator_init_data to pointer type. This will avoid the copy of entire regualator init data into platform data member when adding dt support and it can be achieve by simple assignment: pdata->init_data = of_get_regulator_init_data(dev, dev->of_node); Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65910 regulator: add device tree supportRhyland Klein2012-05-121-0/+108
| | | | | | | Add devicetree based initialization support for TI tps65910 regulators. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da903x: Convert to get_voltage_selAxel Lin2012-05-121-25/+23
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da903x: Fix list voltage for da9030 ldo14Axel Lin2012-05-121-1/+19
| | | | | | | | da903x_list_voltage does not return correct voltage for da9030 ldo14. Implement da9030_list_ldo14_voltage to return correct voltage for da9030 ldo14. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Staticise non-exported symbol s5m8767_opmode_regMark Brown2012-05-121-1/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8400: Modernise driverMark Brown2012-05-121-125/+44
| | | | | | | Update the driver to use all the regmap based helpers, saving a nice chunk of code (especially for the DCDCs). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x: Convert to regulator_list_voltage_linear()Mark Brown2012-05-121-11/+4
| | | | | | | Only the alive LDOs can actually use this as all the other regulators have two linear ranges. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Allow drivers to set simple linear voltage maps as dataMark Brown2012-05-121-0/+53
| | | | | | | | | | | | | | A lot of regulator hardware maps selectors on to voltages with a simple linear mapping function selector = base + (selector * step size) Provide off the shelf list_voltage() and map_voltage() operations which use new min_uV and uV_step members in the regulator_desc to implement this function. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* regulator: core: Allow regulators to provide a voltage to selector mappingMark Brown2012-05-121-27/+55
| | | | | | | | | | | | In order to allow more drivers to factor things out into data allow drivers to provide a mapping function to convert voltages into selectors. This allows any driver to use set_voltage_sel(). The existing mapping based on iterating over list_voltage() is provided as an operation which can be assigned to the new map_voltage() function though for ease of transition it is treated as the default. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* Merge remote-tracking branch 'regulator/topic/drivers' into regulator-nextMark Brown2012-05-1226-294/+342
|\ | | | | | | | | Conflicts: drivers/regulator/88pm8607.c (simple overlap with a bugfix in v3.4)
| * regulator: twl-regulator: make TWL4030_ALLOW_UNSUPPORTED more configurable.NeilBrown2012-05-091-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regulators in the twl4030 can provide some voltage settings that are not offically supported. These settings are disabled by default, but can be enabled with CONFIG_TWL4030_ALLOW_UNSUPPORTED=y However - that config variable is not mentioned in any Kconfig so cannot be used, and - a global setting is clumsy - a per regulator setting would be better. So define a new 'feature' flag that a board file can set to enable these unsupported volatages for boards which need them. This flag cannot (yet) be set using device-tree. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: tps65910: Convert to get_voltage_selAxel Lin2012-05-091-25/+9
| | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud