aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-12-24regulator: act8865: add PMIC act8865 driverWenyou Yang1-0/+53
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-24Merge remote-tracking branch 'regulator/topic/optional' into regulator-nextMark Brown1-5/+0
2013-10-24Merge remote-tracking branch 'regulator/topic/linear' into regulator-nextMark Brown1-2/+9
2013-10-24Merge remote-tracking branch 'regulator/topic/fixed' into regulator-nextMark Brown1-0/+2
2013-10-24Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown1-0/+2
2013-10-24Merge remote-tracking branch 'regulator/topic/alias' into regulator-nextMark Brown2-0/+84
2013-10-18regulator: core: Add ability to create a lookup alias for supplyCharles Keepax1-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>
2013-10-11regulator: Add REGULATOR_LINEAR_RANGE macroAxel Lin1-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>
2013-10-11regulator: Remove max_uV from struct regulator_linear_rangeAxel Lin1-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>
2013-09-18regulator: core: add support for configuring turn-on time through constraintsLaxman Dewangan1-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>
2013-09-17regulator: fix fatal kernel-doc errorRandy Dunlap1-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>
2013-09-17regulator: core: Remove unused regulator_use_dummy_regulator()Mark Brown1-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>
2013-09-17regulator: core: Provide managed regulator registrationMark Brown1-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>
2013-09-10regulator: core: provide fixed voltage in desc for single voltage railLaxman Dewangan1-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>
2013-09-01Merge remote-tracking branch 'regulator/topic/ramp' into regulator-nextMark Brown1-0/+1
2013-09-01Merge remote-tracking branch 'regulator/topic/pfuze100' into regulator-nextMark Brown1-0/+44
2013-09-01Merge remote-tracking branch 'regulator/topic/optional' into regulator-nextMark Brown1-0/+25
2013-09-01Merge remote-tracking branch 'regulator/topic/max8660' into regulator-nextMark Brown1-1/+1
2013-09-01Merge remote-tracking branch 'regulator/topic/fan53555' into regulator-nextMark Brown1-0/+1
2013-09-01Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown1-2/+5
2013-08-29regulator: Add devm_regulator_get_exclusive()Matthias Kaehlcke1-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>
2013-08-07regulator: fan53555: Prevent multiple include of fan53555.hAxel Lin1-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>
2013-08-02regulators: max8660: add DT bindingsDaniel Mack1-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>
2013-07-31regulator: core: Provide hints to the core about optional suppliesMark Brown1-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>
2013-07-31regulator: core: Add missing stub for regulator_get_exclusive()Mark Brown1-0/+7
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-25regulator: pfuze100: add pfuze100 regulator driverRobin Gong1-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>
2013-07-15regulator: core: Add support for disabling ramp delayYadwinder Singh Brar1-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>
2013-07-15regulator: core: Add helpers for multiple linear rangesMark Brown1-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>
2013-07-15regulator: core: Make set_voltage_tol() try for mid-range firstMark Brown1-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>
2013-07-01Merge remote-tracking branch 'regulator/topic/linar' into regulator-nextMark Brown1-0/+1
2013-06-11regulator: ab8500-ext: Register as a device in its own rightLee Jones1-4/+0
Some platforms don't support the AB8500 external regulators, so instead of having a list of is_<platform>() calls prior to calling ab8500_ext_regulator_init() from ab8500_regulator_probe(), we can only register as a platform device on platforms which require them. It means we also have more control over them when booting with Device Tree. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonielinaro.org>
2013-06-07regulator: core: add regulator_get_linear_step()Paul Walmsley1-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>
2013-04-28Merge remote-tracking branch 'regulator/topic/max8952' into v3.9-rc8Mark Brown1-5/+5
2013-04-28Merge remote-tracking branch 'regulator/topic/gpio' into v3.9-rc8Mark Brown1-2/+2
2013-04-28Merge remote-tracking branch 'regulator/topic/enable-invert' into v3.9-rc8Mark Brown1-0/+3
2013-04-28Merge remote-tracking branch 'regulator/topic/core' into v3.9-rc8Mark Brown1-7/+7
2013-04-28Merge remote-tracking branch 'regulator/topic/ascend' into v3.9-rc8Mark Brown1-0/+2
2013-04-18regulator: core: Add regulator_map_voltage_ascend() APIAxel Lin1-0/+2
A lot of regulator hardware has ascendant voltage list. This patch adds regulator_map_voltage_ascend() and export it. Drivers that have ascendant voltage list can use this as their map_voltage() operation, this is more efficient than default regulator_map_voltage_iterate() function. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-11regulator: ab8500-ext: Make the return type of ab8500_ext_regulator_exit() voidAxel Lin1-1/+1
ab8500_ext_regulator_exit() never fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-05regulator: max8952: Add Device Tree supportTomasz Figa1-4/+4
This patch adds Device Tree support to max8952 regulator driver. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-05regulator: max8952: Separate constraints from platform data structTomasz Figa1-1/+1
This patch modifies platform data structure of max8952 driver to use pointer to regulator_init_data struct instead of embedding it. This is a prerequisite for adding Device Tree support for the driver. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-03regulator: ab8500: Introduce aux5, aux6 regulators for AB8540Zhenhua HUANG1-0/+2
Introduce aux5, aux6 into ab8540 regulator framework. Signed-off-by: Zhenhua HUANG <zhenhua.huang@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Maxime COQUELIN <maxime.coquelin@stericsson.com> Reviewed-by: David PARIS <david.paris@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02regulator: ab8500-ext: Remove unused REGULATOR_AB8500_EXT guardLee Jones1-15/+4
Before the AB8500 External Regulator driver was Mainlined, it used to be conditionally compiled in using the CONFIG_REGULATOR_AB8500_EXT flag. During the review process that capability was removed, but the guard controlling prototyping slipped though the net. This patch cleans it up. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-01regulator: ab8500: Add support for the ab8540Lee Jones1-0/+86
To obtain full AB8540 regulator support, the AB8500 regulator driver first needs to know its register layout and their initialisation values for each. That information is provided via a couple of large data structures which we provide here. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-01regulator: ab8500: add support for ab8505Lee Jones1-2/+73
To obtain full AB8505 regulator support, the AB8500 regulator driver first needs to know its register layout and their initialisation values for each. That information is provided via a couple of large data structures which we provide here. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-29regulator: ab8500: Init debug from regulator driverLee Jones1-0/+14
The purpose of this patch is to guarantee that ab8500-debug will record the regulator registers before they are modified by the ab8500 regulator driver. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-29regulator: ab8500: Remove USB regulatorLee Jones1-1/+0
The USB regulator is controlled by hardware. The software support was only needed for early hardware (ED) which is no longer supported. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-29regulator: ab8500-ext: Add HW request supportBengt Jonsson1-0/+4
Support for HW request is added in the external regulator driver. A flag in the board configuration can be set to let HW control the regulator when there is no SW request. This means that the regulator will be put in high power mode when there is a SW request and in HW-request mode otherwise. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Mattias NILSSON <mattias.i.nilsson@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-29regulator: ab8500-ext: New driver to control external regulatorsLee Jones1-0/+28
The ABx500 is capable of controlling three external regulator supplies. Most commonly on and off are supported, but if an external regulator chipset or power supply supports high-power and low-power mode settings, we can control those too. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-28regulator: ab8500: Clean out SoC registersLee Jones1-12/+0
Clean out initialisation that is handled by SoC. Regulator settings for Vpll (partly), Vsmps1, Vsmps2, Vsmps3 (partly), Vrf1, Varm, Vape, Vbb, Vmod are cleaned out. They should not be touched by the kernel. We also update many of the initialisation values to be more in-line with the current development efforts of ST-Ericsson internal engineers. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>