summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)Author
2013-10-15regulator: max8997: Fix checkpatch issueJingoo Han
Fix the following checkpatch warning. WARNING: quoted string split across lines Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15regulator: lp3971: Fix checkpatch issueJingoo Han
Fix the following checkpatch warnings. WARNING: please, no spaces at the start of a line Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15regulator: fixed: Fix checkpatch issueJingoo Han
Fix the following checkpatch warnings. WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15regulator: anatop: Fix checkpatch issueJingoo Han
Fix the following checkpatch warning. WARNING: quoted string split across lines Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14treewide: Fix typo in printkMasanari Iida
Correct spelling typo within various part of the kernel Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-11regulator: Add REGULATOR_LINEAR_RANGE macroAxel Lin
Add REGULATOR_LINEAR_RANGE macro and convert regulator drivers to use it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11regulator: Remove max_uV from struct regulator_linear_rangeAxel Lin
linear ranges means each range has linear voltage settings. So we can calculate max_uV for each linear range in regulator core rather than set the max_uV field in drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11Merge remote-tracking branch 'regulator/topic/as3722' into regulator-linearMark Brown
2013-10-11regulator: ti-abb: Fix operator precedence typoNishanth Menon
commit 40b1936e (regulator: Introduce TI Adaptive Body Bias(ABB) on-chip LDO driver) missed a pair of brackets which cause the wrong vset data to be picked up from efuse, resulting in bad VBB voltage values. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2013-10-09regulator: tps65910: get regulators node from parent node onlyLaxman Dewangan
As per the devicetree binding document of TPS65910, the "regulators" subnode should be under the parent node, not outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which searches the "regulators" node from the parent node to end of DTS file. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-09regulator: tps6586x: get regulators node from parent node onlyLaxman Dewangan
As per the devicetree binding document of TPS6586x, the "regulators" subnode should be under the parent node, not outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which searches the "regulators" node from the parent node to end of DTS file. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-09regulator: tps65090: get regulators node from parent node onlyLaxman Dewangan
As per the devicetree binding document of TPS65090, the "regulators" subnode should be under the parent node, not outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which searches the "regulators" node from the parent node to end of DTS file. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07regulator: palmas: get regulators node from parent node onlyLaxman Dewangan
The device tree binding of Palmas regulator driver says as: palmas_pmis { compatible = "ti,palmas-pmic"; ... regulators { ... } }; In this "regulators" subnode is expected to be part of parent node, not the outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which actually searches the "regulators" node from the parent node to end of DTS file. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-04regulator: gpio: Remove redundant breakSachin Kamat
'break' after goto has no effect. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-04regulator: core: Always warn when using a dummy regulatorMark Brown
This helps people spot if they have missed a supply from a device tree or equivalent data structure. Suggested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03regulator: as3722: Fix off-by-one n_voltages setting for SDxAxel Lin
AS3722_SDx_VSEL_MAX means the maximum selecter, the n_voltages should be AS3722_SDx_VSEL_MAX + 1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03regulator: as3722: Fix equation to calculate max_uV in regulator_lin_range macroAxel Lin
Fix off-by-one in the equation to calculate max_uV and also adjust the _min_uV setting accordingly. For LDOs: The voltage select bits set the LDO output voltage 0.825V...3.3V, 25mV steps ....00h : LDO off 01h-24h : V_LDO4 = 0.8V + ldo4_vsel * 25mV = 0.825V + (ldo4_vsel - 1h) * 25mV 25h-3Fh : do not use 40h-7Fh : V_LDO4 = 1.725V + (ldo4_vsel - 40h) * 25mV For SD2345: The voltage select bits set the DC/DC output voltage level and power the DC/DC converter down. ....00h : DC/DC powered down 01h-40h : V_SD2 = 0.6V + sd2_vsel * 12.5mV = 0.6125V + (sd2_vsel - 1h) * 12.5mV 41h-70h : V_SD2 = 1.4V + (sd2_vsel - 40h) * 25mV = 1.425V + (sd2_vsel - 41h) * 25mV 71h-7Fh : V_SD2 = 2.6V + (sd2_vsel - 70h) * 50mV = 2.65V + (sd2_vsel - 71h) * 50mV Note, the third entry in as3722_sd2345_ranges is wrong in current code. Fix it based on the datasheet. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03regulator: stw481x-vmmc: Set missing .of_match_table to stw481x_vmmc_matchAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: tps6524x: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: da9210: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30Merge remote-tracking branch 'regulator/topic/tps6524x' into regulator-devmMark Brown
2013-09-30Merge remote-tracking branch 'regulator/topic/da9210' into regulator-devmMark Brown
2013-09-30regulator: vexpress: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: twl: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: tps6105x: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: pcf50633: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: pcap: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: max8925: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: lp8788-ldo: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: lp8788-buck: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: lp872x: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: da9063: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: ab8500-ext: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: ab3100: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30Merge remote-tracking branch 'regulator/fix/wm8350' into regulator-linusMark Brown
2013-09-30Merge remote-tracking branch 'regulator/fix/wm831x' into regulator-linusMark Brown
2013-09-30Merge remote-tracking branch 'regulator/fix/ti-abb' into regulator-linusMark Brown
2013-09-30Merge remote-tracking branch 'regulator/fix/palmas' into regulator-linusMark Brown
2013-09-30Merge remote-tracking branch 'regulator/fix/da9063' into regulator-linusMark Brown
2013-09-30regulator: core: Reduce busy-wait loopingThierry Reding
Keep busy-wait looping to a minimum while waiting for a regulator to ramp-up to the target voltage. This follows the guidelines set forth in Documentation/timers/timers-howto.txt and assumes that regulators are never enabled in atomic context. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27regulator: ti-abb: skip optional parameter for ldo-addressNishanth Menon
On platforms like OMAP4460, LDO override is never used. Even though efuse determines the ABB bias mode to operate at, ABB voltage is preconfigured in internal efuse registers without the need for LDO override for bias voltage. So skip optional parameter if property is not present. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27regulator: ti-abb: Fix bias voltage glitch in transition to bypass modeNishanth Menon
As documented in Application Note SWPA117 v2.1(NDA), LDO override has a requirement that when switching from Bias active + override active mode(FBB/RBB) to Bypass(nominal) mode, LDO reset must be performed *after* LDO transitions to Bypass(nominal) mode. The same rule in reverse applies when switching from a ABB bypass mode to ABB enabled - LDO override *must* be performed prior to transition to required ABB mode, if we do not do that, the same glitch takes place. Currently while transitioning to ABB bypass, we reset the LDO overide prior to the transition which causes a few milliseconds where ABB LDO voltage could go all the way to 800mV(based on SoC process node), during this period, the delta voltage between VDD rail and VBB rail could cause the system to improperly function. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2013-09-26regulator: da9210: add Device Tree supportGuennadi Liakhovetski
This patch adds basic Device Tree support to the da9210 regulator driver - with no special properties, since also driver's platform data only contains standard regulator initialisation parameters. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24regulator: core: Always use return value when regulator_dev_lookup() failsMark Brown
Ensure that the return value is always set when we return now that the logic has changed for regulator_get_optional() so we don't get missing codes leaking out. Reported-by: Thierry Reding <treding@nvidia.com> Tested-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-23regulator: wm831x-ldo: Fix max_uV for gp_ldo and aldo linear range settingsAxel Lin
Fix the linear range settings in commit 5ff26a14c3331 "regulator: wm831x-ldo: Convert to use linear ranges". For wm831x_gp_ldo: We have below equations for list voltage before converting to linear ranges: sel <= 0xe: volt = 0.9-1.6V in 50mV steps sel <= 0x1f: volt = 1.7-3.3V in 100mV steps max_uV for the first linear range should be 1600000 rather than 1650000. Fix it. For wm831x_aldo: We have below equations for list voltage before converting to linear ranges: sel <= 0xc: volt = 1-1.6V in 50mV steps sel <= 0x1f volt = 1.7-3.5V in 100mV steps max_uV for the first linear range should be 1600000 rather than 1650000. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-23regulator: core: Fix return code for invalid parametersMark Brown
We should be returning an error, a repeated call will never succeed. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-20regulator: as3722: add regulator driver for AMS AS3722Laxman Dewangan
The AMS AS3722 is a compact system PMU suitable for mobile phones, tablets etc. It has 4 DCDC step down regulators, 3 DCDC step down controller, 11 LDOs. Add a driver to support accessing the DCDC/LDOs found on the AMS AS3722 PMIC using regulators. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Florian Lobmaier <florian.lobmaier@ams.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-20regulator: core: Fix default return value for _get()Mark Brown
Now that we are defaulting to providing dummy regulators fix the logic for substituting a dummy by making the default return code -EPROBE_DEFER. Reported-by: Thierry Reding <treding@nvidia.com> Tested-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-20regulator: core: set current constraints while setting machine constraintsLaxman Dewangan
Machine constraints is configured during regulator register. If current constraints are provided through machine constraints then it is observed that sometime the current configured on rail is out of range what machine constraint has. Set the current constraints when setting machine constraints to make sure that rail's current is within the range of given machine constraints. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-20regulator: tps6524x: Remove redundant spi_set_drvdataSachin Kamat
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>