summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)Author
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>
2012-05-10regulator: wm831x: Register all normal regulatorsMark Brown
Register all normal regulators rather than skipping unconfigured ones now that the core can handle regulators without init data. Skip the boost and isink regulators since they are normally controlled by other drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-09regulator: twl-regulator: make TWL4030_ALLOW_UNSUPPORTED more configurable.NeilBrown
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>
2012-05-09regulator: tps65910: Convert to get_voltage_selAxel 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-08regulator: wm8994: Use main I2C device as struct deviceMark Brown
This makes logging a bit clearer as it gives the actual bus location and makes things like board hookup a bit smoother. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-08regulator: tps62360: fix stylistic issue and optimize codeLaxman Dewangan
Fix multiple stylistic issue like: - The print message should be not break into multiple line. - line gap after variable declaration and statement. - checkpatch error. - some typo. Some enhancement on error message printing to print error value also along with proper text. Avoid voltage_base conversion to microvolts every time. Put init functions in init section. Using efficient function inplace of calling multiple function to reduce the code size. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-07regulator: wm831x-dcdc: Convert to gpio_request_one()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-07regulator: wm8994: Convert to gpio_request_one()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-07regulator: tps62360: Provide settling time for voltage changeLaxman Dewangan
Settling time is require when there is voltage output change. Implement set_voltage_time_sel() callback which returns delay time for voltage change to settle down to new value. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-07regulator: tps62360: enable register cacheLaxman Dewangan
Enable cache of device register using regmap cache RBTREE. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-07regulator: Actually free the regulator in devm_regulator_put()Mark Brown
It turns out that (quite surprisingly) devres_destroy() only undoes the devres mapping, it doesn't destroy the underlying resource, meaning that anything using devm_regulator_put() would leak. While we wait for the new devres_release() which does what we want to get merged open code it in devm_regulator_put(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2012-05-07regulator: da9052: fix bug in device tree iteration loopYing-Chun Liu (PaulLiu)
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>
2012-05-07regulator: fixed: add property for gpio open drain flagLaxman Dewangan
Add property for the gpio flag open drain when registering fixed regulator. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-04regulator: 88pm8607: 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-04regulator: rc5t583: 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-04regulator: da9052: 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-04tps6586x: Add device tree supportThierry Reding
This commit adds device tree support for the TPS6586x regulator. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-04regulator: Add generic DT parsing for regulatorsThierry Reding
Looking up init data for regulators found on chips is a common operation that can be handled in a generic way. The new helper function introduced by this patch looks up the children of a given node by names specified in a match table and fills that match table with information parsed from the DT. This is based on work by Rhyland Klein <rklein@nvidia.com>. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-23regulator: wm831x-dcdc: Specify supply namesMark Brown
Allows hookup via normal consumer mechanisms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-23regulator: wm831x-ldo: Set up supply namesMark Brown
Allows hookup via normal consumer mechanisms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-23regulator: tps65912: 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-04-23regulator: max8998: Convert ot use devm_kzallocAxel Lin
Also simplify the error handling to start unwind from the place regulator_register fails. No need to check rdev[i] is NULL or not before calling regulator_unregister. regulator_unregister is safe if rdev is NULL, Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>