summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
Commit message (Collapse)AuthorAgeFilesLines
* regulator: fix kernel-doc warnings in header filesRandy Dunlap2014-08-282-0/+3
| | | | | | | | | | | Fix kernel-doc warnings in regulator header files: Warning(..//include/linux/regulator/machine.h:140): No description found for parameter 'ramp_disable' Warning(..//include/linux/regulator/driver.h:279): No description found for parameter 'linear_ranges' Warning(..//include/linux/regulator/driver.h:279): No description found for parameter 'n_linear_ranges' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mark Brown <broonie@linaro.org>
*---. Merge remote-tracking branches 'regulator/topic/da9211', ↵Mark Brown2014-08-052-0/+58
|\ \ \ | | | | | | | | | | | | 'regulator/topic/getreg', 'regulator/topic/gpio' and 'regulator/topic/lp872x' into regulator-next
| | * | regulator: Add missing statics and inlines for stub functionsMark Brown2014-07-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | So we don't get multiple definitions. Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | regulator: Add helpers for low-level register accessTuomas Tynkkynen2014-07-251-0/+26
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper functions that allow regulator consumers to obtain low-level details about the regulator hardware, like the voltage selector register address and such. These details can be useful when configuring hardware or firmware that want to do low-level access to regulators, with no involvement from the kernel. The use-case for Tegra is a voltage-controlled oscillator clocksource which has control logic to change the supply voltage via I2C to achieve a desired output clock rate. Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | regulator: da9211: new regulator driverJames Ban2014-07-141-0/+32
| |/ | | | | | | | | | | | | | | This is the driver for the Dialog DA9211 Multi-phase 12A DC-DC Buck Converter regulator. It communicates via an I2C bus to the device. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
| \
| \
| \
| \
*-----. \ Merge remote-tracking branches 'regulator/topic/88pm800', ↵Mark Brown2014-08-052-15/+22
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | 'regulator/topic/ab8500', 'regulator/topic/act8865', 'regulator/topic/as3722' and 'regulator/topic/bcm590xx' into regulator-next
| | | * | regulator: act8865: add support for act8846Beniamino Galvani2014-08-051-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add device id and definition of registers and regulators to support the act8846 PMU. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Tested-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | * | regulator: act8865: prepare support for other act88xx devicesBeniamino Galvani2014-08-051-1/+5
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch prepares support for other devices in the act88xx family of PMUs manufactured by Active-Semi. http://www.active-semi.com/products/power-management-units/act88xx/ Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Tested-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | regulator: ab8500: Remove ab8500_regulator_debug_init/exit()Axel Lin2014-06-221-14/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_REGULATOR_AB8500_DEBUG is always not defined. ab8500_regulator_debug_init() is not called at all now, ab8500_regulator_debug_exit() simply return 0, thus remove them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'regulator/fix/core' into regulator-linusMark Brown2014-06-161-0/+5
|\ \ \ | |/ / |/| |
| * | regulator: add regulator_can_change_voltage stubArnd Bergmann2014-06-041-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_REGULATOR is not set, we cannot call regulator_can_change_voltage() from a device driver, which results in a build error like video/fbdev/omap2/dss/hdmi5.c: In function 'hdmi_init_regulator': video/fbdev/omap2/dss/hdmi5.c:149:2: error: implicit declaration of function 'regulator_can_change_voltage' [-Werror=implicit-function-declaration] even for drivers that don't require the regulator API normally. Such a use was recently added in the omap2+ hdmi driver. This avoids the problem by adding a static inline function stub in the API header, as we have for most of the other regulator functions as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Mark Brown <broonie@kernel.org> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
*-. \ Merge remote-tracking branches 'regulator/topic/s5m8767', ↵Mark Brown2014-06-021-0/+6
|\ \ \ | | |/ | |/| | | | 'regulator/topic/stub', 'regulator/topic/tps65090', 'regulator/topic/tps65217' and 'regulator/topic/tps65218' into regulator-next
| | * regulators: Add definition of regulator_set_voltage_time() for !CONFIG_REGULATORViresh Kumar2014-05-281-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have dummy implementation for most of the regulators APIs for !CONFIG_REGULATOR case and were missing it for regulator_set_voltage_time(). Found this issue while compiling cpufreq-cpu0 driver without regulators support in kernel. drivers/cpufreq/cpufreq-cpu0.c: In function ‘cpu0_cpufreq_probe’: drivers/cpufreq/cpufreq-cpu0.c:186:3: error: implicit declaration of function ‘regulator_set_voltage_time’ [-Werror=implicit-function-declaration] Fix this by adding dummy definition for regulator_set_voltage_time(). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown2014-06-021-16/+20
|\ \
| * | regulator: Constify the pointer to alias name arrayLee Jones2014-05-231-16/+20
| |/ | | | | | | | | | | | | Toughen-up checks for read-only regulator names. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: core: Return error in get optional stubTim Kryger2014-04-181-2/+2
|/ | | | | | | | | | | | | Drivers that call regulator_get_optional are tolerant to the absence of that regulator. By modifying the value returned from the stub function to match that seen when a regulator isn't present, callers can wrap the regulator logic with an IS_ERR based conditional even if they happen to call regulator_is_supported_voltage. This improves efficiency as well as eliminates the possibility for a very subtle bug. Signed-off-by: Tim Kryger <tim.kryger@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'regulator/topic/max8973', ↵Mark Brown2014-03-261-0/+14
|\ \ | | | | | | | | | 'regulator/topic/max8997', 'regulator/topic/max8998', 'regulator/topic/mc13xxx', 'regulator/topic/pfuze100', 'regulator/topic/rc5t583' and 'regulator/topic/s2mps11' into regulator-next
| | * regulator: pfuze100: add pfuze200 supportRobin Gong2014-03-041-0/+14
| |/ | | | | | | | | | | | | support pfuze200 chip which remove SW1C and SW4 based on pfuze100. Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: helpers: Modify helpers enabling multi-bit controlCarlo Caione2014-03-061-0/+8
|/ | | | | | | | | | | | | | | | | | This patch extends the regulator helpers to account for device that use multiple bits for control when using regmap enable/disable/bypass ops. The actual regulator helpers wrongly assume that the regulator control is always performed using single bits, using in the regulator_desc struct only two parameters *_reg and *_mask defining register and mask for control. This patch extends this struct and introduces the helpers to take into account devices where control is performed using multiple bits and specific multi-bit values are used for enabling/disabling/bypassing the regulator. Signed-off-by: Carlo Caione <carlo@caione.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: act8865: add PMIC act8865 driverWenyou Yang2013-12-241-0/+53
| | | | | Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'regulator/topic/optional' into regulator-nextMark Brown2013-10-241-5/+0
|\
| * regulator: core: Remove unused regulator_use_dummy_regulator()Mark Brown2013-09-171-5/+0
| | | | | | | | | | | | | | | | No boards have used this functionality and the new default of providing dummy regulators by default provides a better solution to the problem it was trying to solve. Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'regulator/topic/linear' into regulator-nextMark Brown2013-10-241-2/+9
|\ \
| * | regulator: Add REGULATOR_LINEAR_RANGE macroAxel Lin2013-10-111-0/+9
| | | | | | | | | | | | | | | | | | | | | 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>
| * | regulator: Remove max_uV from struct regulator_linear_rangeAxel Lin2013-10-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'regulator/topic/fixed' into regulator-nextMark Brown2013-10-241-0/+2
|\ \ \
| * | | regulator: core: provide fixed voltage in desc for single voltage railLaxman Dewangan2013-09-101-0/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If given rail has the single voltage (n_voltages = 1) then provide the rail voltage through regulator descriptor so that core can use this value for finding voltage. This will avoid the implementation of the callback for get_voltage() or list_voltage() callback on regulator driver. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown2013-10-241-0/+2
|\ \ \
| * | | regulator: core: add support for configuring turn-on time through constraintsLaxman Dewangan2013-09-181-0/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The turn-on time of the regulator depends on the regulator device's electrical characteristics. Sometimes regulator turn-on time also depends on the capacitive load on the given platform and it can be more than the datasheet value. The driver provides the enable-time as per datasheet. Add support for configure the enable ramp time through regulator constraints so that regulator core can take this value for enable time for that regulator. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'regulator/topic/alias' into regulator-nextMark Brown2013-10-242-0/+84
|\ \ \ | |_|/ |/| |
| * | regulator: core: Add ability to create a lookup alias for supplyCharles Keepax2013-10-181-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These patches add the ability to create an alternative device on which a lookup for a certain supply should be conducted. A common use-case for this would be devices that are logically represented as a collection of drivers within Linux but are are presented as a single device from device tree. It this case it is necessary for each sub device to locate their supply data on the main device. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | regulator: core: Provide managed regulator registrationMark Brown2013-09-171-0/+5
| |/ | | | | | | | | | | | | | | | | Many regulator drivers have a remove function that consists solely of calling regulator_unregister() so provide a devm_regulator_register() in order to allow this repeated code to be removed and help eliminate error handling code. Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: fix fatal kernel-doc errorRandy Dunlap2013-09-171-0/+2
|/ | | | | | | | | | Fix fatal kernel-doc error in <linux/regulator/driver.h>: Error(include/linux/regulator/driver.h:52): cannot understand prototype: 'struct regulator_linear_range ' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> [Rewrote first line -- broonie] Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'regulator/topic/ramp' into regulator-nextMark Brown2013-09-011-0/+1
|\
| * regulator: core: Add support for disabling ramp delayYadwinder Singh Brar2013-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | Some hardwares support disabling ramp delay, so adding ramp_disable flag to constraints. It will be used to figure out whether ramp_delay in constraints is explicitly set to zero or its unintialized (zero by default). And we don't need to call set_voltage_time_sel() for regulators for whom ramp delay is disabled in constraints. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'regulator/topic/pfuze100' into regulator-nextMark Brown2013-09-011-0/+44
|\ \
| * | regulator: pfuze100: add pfuze100 regulator driverRobin Gong2013-07-251-0/+44
| |/ | | | | | | | | | | | | | | Add pfuze100 regulator driver. Signed-off-by: Robin Gong <b38343@freescale.com> Tested-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'regulator/topic/optional' into regulator-nextMark Brown2013-09-011-0/+25
|\ \
| * | regulator: Add devm_regulator_get_exclusive()Matthias Kaehlcke2013-08-291-0/+2
| | | | | | | | | | | | | | | | | | | | | Add a resource managed regulator_get_exclusive() Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | regulator: core: Provide hints to the core about optional suppliesMark Brown2013-07-311-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the majority of supplies on devices are mandatory and can't be physically omitted for electrical reasons some devices do have optional supplies and need to know if they are missing, MMC being the most common of these. Currently the core accurately reports all errors when regulators are requested since it does not know if the supply is one that must be provided even if by a regulator software does not know about or if it is one that may genuinely be disconnected. In order to allow this behaviour to be changed and stub regulators to be provided in the former case add a new regulator request function regulator_get_optional() which provides a hint to the core that the regulator may genuinely not be connected. Currently the implementation is identical to the current behaviour, future patches will add support in the core for returning stub regulators in the case where normal regulator_get() fails and the board has requested it. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Chris Ball <cjb@laptop.org>
| * | regulator: core: Add missing stub for regulator_get_exclusive()Mark Brown2013-07-311-0/+7
| |/ | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'regulator/topic/max8660' into regulator-nextMark Brown2013-09-011-1/+1
|\ \
| * | regulators: max8660: add DT bindingsDaniel Mack2013-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds devicetree bindings for max8660, along with some documentation. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'regulator/topic/fan53555' into regulator-nextMark Brown2013-09-011-0/+1
|\ \ \
| * | | regulator: fan53555: Prevent multiple include of fan53555.hAxel Lin2013-08-071-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | Add define for __FAN53555_H__ to prevent multiple include of the header file. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown2013-09-011-2/+5
|\ \ \ | |_|/ |/| |
| * | regulator: core: Make set_voltage_tol() try for mid-range firstMark Brown2013-07-151-2/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expected semantic for something expressed as a tolerance is that it should deliver the specified value with some deviation allowed but this is not what set_voltage_tol() currently does. Instead it just passes the maximum possible range to set_voltage() which will typically result in a voltage aimed at lower than the target voltage. Instead first try to set a voltage between the target voltage and the upper limit, then fall back on the full range. This will be much more robust against physical variation in systems and makes the API behave more like users would expect. Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: core: Add helpers for multiple linear rangesMark Brown2013-07-151-0/+25
|/ | | | | | | | | | | | | Many regulators have several linear ranges of selector with different step sizes, for example offering better resolution at lower voltages. Provide regulator_{map,list}_voltage_linear_range() allowing these regulators to use generic code. To do so a table of regulator_linear_range structs needs to be pointed to from the descriptor. This was inspired by similar code included in a driver submission from Chao Xie and Yi Zhang at Marvell. Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'regulator/topic/linar' into regulator-nextMark Brown2013-07-011-0/+1
|\
| * regulator: core: add regulator_get_linear_step()Paul Walmsley2013-06-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add regulator_get_linear_step(), which returns the voltage step size between VSEL values for linear regulators. This is intended for use by regulator consumers which build their own voltage-to-VSEL tables. Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> Reviewed-by: Andrew Chew <achew@nvidia.com> Cc: Matthew Longnecker <mlongnecker@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
OpenPOWER on IntegriCloud