summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-05-18regulator: ab3100: Use regulator_map_voltage_iterate()Axel Lin
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>
2012-05-18regulator: tps65217: Convert to set_voltage_sel and map_voltageAxel Lin
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>
2012-05-18regulator: Enable the ab8500 for Device TreeLee Jones
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>
2012-05-18regulator: ab8500: Split up probe() into manageable piecesLee Jones
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>
2012-05-17regulator: max8925: Remove check_range function and max_uV from struct ↵Axel Lin
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>
2012-05-17regulator: max8649: Remove unused check_range() functionAxel Lin
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>
2012-05-17regulator: rc5t583: Remove max_uV from struct rc5t583_regulator_infoAxel Lin
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>
2012-05-16regulator: da9052: Convert to set_voltage_sel and map_voltageAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-16regulator: max8952: Use devm_kzallocAxel Lin
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>
2012-05-16regulator: isl6271a: Convert to set_voltage_sel and regulator_map_voltage_linearAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-16regulator: isl6271a: Convert to get_voltage_selAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-16regulator: isl6271a: Use regulator_list_voltage_linear()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-15regulator: max8660: Convert to set_voltage_sel and regulator_map_voltage_linearAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-15regulator: max8660: Convert to get_voltage_selAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-15regulator: max8660: Convert to regulator_list_voltage_linear()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-15regulator: da903x: Kill da903x_[get|set]_[ldo12|ldo14]_voltage_sel() functionsAxel Lin
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>
2012-05-15regulator: da903x: Convert to set_voltage_sel and map_voltageAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-15regulator: da903x: Convert to regulator_list_voltage_linear()Axel Lin
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>
2012-05-14regulator: tps62360: support force PWM mode via regulator modeLaxman Dewangan
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>
2012-05-14regulator: rc5t583: Convert to regulator_set_voltage_sel_regmap and ↵Axel Lin
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>
2012-05-14regulator: rc5t583: Convert to regulator_list_voltage_linear()Axel Lin
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>
2012-05-14regulator: max8649: Convert to regulator_set_voltage_sel_regmap and ↵Axel Lin
regulator_map_voltage_linear Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: max8649: Convert to regulator_list_voltage_linear()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: max8649: Use regulator_get_voltage_sel_regmap()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: max8649: Convert to get_voltage_selAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: tps62360: Fix build error due to missing semicolonAxel Lin
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>
2012-05-14regulator: wm8994: Allow registration with no platform dataMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: core: Don't open code _regulator_is_enabled()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2012-05-14regulator: wm831x-dcdc: Add missing checks for pdata before useMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: max8925: Convert to set_voltage_sel() and map_voltage()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: max8925: Convert to regulator_list_voltage_linear()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: max8925: Convert to get_voltage_selAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-14regulator: core: Release regulator-regulator supplies on errorMark Brown
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
2012-05-14regulator: tps62360: Convert to set_voltage_sel and regulator_map_voltage_linearAxel Lin
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>
2012-05-14regulator: tps62360: Convert to regulator_list_voltage_linear()Axel Lin
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>
2012-05-14regulator: core: Ensure simple linear voltage mappings falls within the ↵Axel Lin
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>
2012-05-13regulator: tps62360: add dt supportLaxman Dewangan
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>
2012-05-13regulator: tps62360: make init_data of platform data to pointer.Laxman Dewangan
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>
2012-05-12regulator: tps65910 regulator: add device tree supportRhyland Klein
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>
2012-05-12regulator: da903x: Convert to get_voltage_selAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-12regulator: da903x: Fix list voltage for da9030 ldo14Axel Lin
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>
2012-05-12regulator: Staticise non-exported symbol s5m8767_opmode_regMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-12regulator: wm8400: Modernise driverMark Brown
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>
2012-05-12regulator: wm831x: Convert to regulator_list_voltage_linear()Mark Brown
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>
2012-05-12regulator: core: Allow drivers to set simple linear voltage maps as dataMark Brown
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>
2012-05-12regulator: core: Allow regulators to provide a voltage to selector mappingMark Brown
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>
2012-05-12Merge remote-tracking branch 'regulator/topic/drivers' into regulator-nextMark Brown
Conflicts: drivers/regulator/88pm8607.c (simple overlap with a bugfix in v3.4)
2012-05-12Merge remote-tracking branches 'regulator/topic/core', ↵Mark Brown
'regulator/topic/regmap' and 'regulator/topic/register' into regulator-next
2012-05-10regulator: core: Warn on missing struct deviceMark Brown
The core really wants a struct device to be supplied for regulators and there's no reason this should be impossible so provide one so complain if we didn't get one. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2012-05-10regulator: dummy: Specify a struct deviceMark Brown
This will be becoming mandatory. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>