summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)Author
2013-05-12regulator: Remove all platform_set_drvdata(pdev, NULL) in driversAxel Lin
Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound", this is done by driver core after device_release or on probe failure. Thus we can remove all platform_set_drvdata(pdev, NULL) in drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-12regulator: ti-abb: Fix off-by-one valid range checking for abb->current_info_idxAxel Lin
abb->current_info_idx is used as array subscript to access volt_table, thus the valid value range should be 0 ... desc->n_voltages - 1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-12regulator: Introduce TI Adaptive Body Bias(ABB) on-chip LDO driverAndrii.Tseglytskyi
Adaptive Body Biasing (ABB) modulates transistor bias voltages dynamically in order to optimize switching speed versus leakage. Texas Instruments' SmartReflex 2 technology provides support for this power management technique with Forward Body Biasing (FBB) and Reverse Body Biasing (RBB). These modulate the body voltage of transistor cells or blocks dynamically to gain performance and reduce leakage. TI's SmartReflex white paper[1] has further information for usage in conjunction with other power management techniques. The application of FBB/RBB technique is determined for each unique device in some process nodes, whereas, they are mandated on other process nodes. In a nutshell, ABB technique is implemented on TI SoC as an on-chip LDO which has ABB module controlling the bias voltage. However, the voltage is unique per device. These vary per SoC family and the manner in which these techniques are used may vary depending on the Operating Performance Point (OPP) voltage targeted. For example: OMAP3630/OMAP4430: certain OPPs mandate usage of FBB independent of devices. OMAP4460/OMAP4470: certain OPPs mandate usage of FBB, while others may optionally use FBB or optimization with RBB. OMAP5: ALL OPPs may optionally use ABB, and ABB biasing voltage is influenced by vset fused in s/w and requiring s/w override of default values. Further, two generations of ABB module are used in various TI SoCs. They have remained mostly register field compatible, however the register offset had switched between versions. We introduce ABB LDO support in the form of a regulator which is controlled by voltages denoting the desired Operating Performance Point which is targeted. However, since ABB transition is part of OPP change sequence, the sequencing required to ensure sane operation w.r.t OPP change is left to the controlling driver (example: cpufreq SoC driver) using standard regulator operations. The driver supports all ABB modes and ability to override ABB LDO vset control efuse based ABB mode detection etc. Current implementation is heavily influenced by the original patch series [2][3] from Mike Turquette. However, the current implementation supports only device tree based information. [1] http://www.ti.com/pdfs/wtbu/smartreflex_whitepaper.pdf [2] http://marc.info/?l=linux-omap&m=134931341818379&w=2 [3] http://marc.info/?l=linux-arm-kernel&m=134931402406853&w=2 [nm@ti.com: co-developer] Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-09Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds
Pull removal of GENERIC_GPIO from Grant Likely: "GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it is possible to do so which has been causing confusion and breakage. This branch does the work to completely eliminate GENERIC_GPIO." * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux: gpio: update gpio Chinese documentation Remove GENERIC_GPIO config option Convert selectors of GENERIC_GPIO to GPIOLIB blackfin: force use of gpiolib m68k: coldfire: use gpiolib mips: pnx833x: remove requirement for GENERIC_GPIO openrisc: default GENERIC_GPIO to false avr32: default GENERIC_GPIO to false xtensa: remove explicit selection of GENERIC_GPIO sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB powerpc: remove redundant GENERIC_GPIO selection unicore32: default GENERIC_GPIO to false unicore32: remove unneeded select GENERIC_GPIO arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB arm: remove redundant GENERIC_GPIO selection mips: alchemy: require gpiolib mips: txx9: change GENERIC_GPIO to GPIOLIB mips: loongson: use GPIO driver on CONFIG_GPIOLIB mips: remove redundant GENERIC_GPIO select
2013-05-08regulator: dbx500: Make local symbol staticSachin Kamat
power_state_active_get is used only in this file. Make it static. While at it also move this function definition inside the CONFIG_REGULATOR_DEBUG macro as it is called only from within it. This also avoids further build warning related to unused definition. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-02regulator: Fix kernel-doc generation warnings.Robert P. J. Day
Add a couple kernel-doc lines to get rid of kernel-doc generation warnings, no functional change. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-28Merge remote-tracking branch 'regulator/topic/wm8994' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/twl' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/tps80031' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/tps6586x' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/tps65023' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/tps62360' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/s5m8767' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/rc5t583' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/palmas' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8998' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8997' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8973' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8952' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8925' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max77686' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max1586' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/lp8788' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/gpio' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/fan53555' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/enable-invert' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/core' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/ascend' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/as3711' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/arizona' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/ab8500' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/ab3100' into v3.9-rc8Mark Brown
2013-04-28regulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_selAxel Lin
It is necessary to clear MC13892_SWITCHERS0_SWxHI bit when set voltage to the voltage range from 1100000 to 1375000. Leaving MC13892_SWITCHERS0_SWxHI bit untouched may result in wrong voltage setting. For example, currently switch voltage from 1400000 to 1300000 will set the voltage to 1800000 because the HI bit is still set. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-28regulator: Remove NULL test before calling regulator_unregister()Axel Lin
It's safe to call regulator_unregister() with NULL, thus remove the NULL test before regulator_unregister() calls. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-28regulator: mc13783: Add device tree probe supportAlexander Shiyan
Patch adds device tree probe support for mc13783-regulator driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-28regulator: mc13xxx: Add warning of incorrect names of regulatorsAlexander Shiyan
This patch adds a warning about incorrect regulators instead of printing the names of non-information message about the wrong amount. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-28regulator: max77686: Don't update max77686->opmode if update register failsAxel Lin
Ensure max77686->opmode always has correct status. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-26regulator: max8952: Add missing config.of_node setting for regulator registerAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-26regulator: ab3100: Fix regulator register error handlingAxel Lin
Ensure to unregister all regulators before return error in probe(). The regulator register order depends on the regulator ID pass to ab3100_regulator_register() function. Thus we need to scan ab3100_regulator_desc and find the index of successfully registered regulators, or alternatively just call ab3100_regulators_remove() to unregister all registered regulators. Since current code uses a static ab3100_regulators table, explicitly set reg->rdev = NULL after regulator_unregister() call to ensure calling ab3100_regulators_remove() in the unwind path always work. Also move ab3100_regulators_remove() to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-26regulator: tps6524x: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: lp8788-buck: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: lp872x: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: mc13892: Use regulator_map_voltage_ascend for ↵Axel Lin
mc13892_sw_regulator_ops Both mc13892_sw1 and mc13892_sw voltage table have ascendant voltage list. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: tps65023: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel tableAxel Lin
tps65020 ldo1 and ldo2 vsel tables are identical, merge them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: tps6507x: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-24regulator: ab3100: device tree supportLinus Walleij
This implements device tree support for the AB3100 regulators driver. The initial settings are moved out of platform data and into the driver for the device tree case, as it appears that there is no way to supply this as AUXDATA for an I2C device. The style and bindings are heavily inspired by Lee Jones' style for AB8500. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-24regulator: ab3100: refactor probe to use IDsLinus Walleij
This refactors the AB3100 regulator probe to use regulator IDs and pass this to a separate registration function. This works much smoother when migrating to device tree, as we can use a match table with this regulator ID encoded in the .driver_data. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-24regulator: max8973: Don't override control1 variable when set ramp delay bitsAxel Lin
Current code overrides control1 variable when setting ramp delay bits. Fix it by just setting ramp_delay bits. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23regulator: tps80031: Convert tps80031_dcdc_ops to [get|set]_voltage_sel_regmapAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>