summaryrefslogtreecommitdiff
path: root/include/linux/regulator (follow)
Commit message (Collapse)AuthorAge
...
* | | regulator: ab8500: Clean out SoC registersLee Jones2013-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | regulator: ab8500: Separate regulator and MFD platform dataBengt Jonsson2013-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ab8500 MFD should not have knowledge about regulator- specific platform data like number of regulators and regulator registers. As the regulator platform data is about to grow with external regulators, this information is moved to a new structure provided by the regulator driver. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Yvan FILLION <yvan.fillion@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | regulator: ab8500: Another push to synchronise recent AB8500 developmentsLee Jones2013-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch ensures that many of the recent developments pertaining to the AB8500 regulator device are propagated out into the public arena. It aims to update some of the existing initialisation values in accordance with internal ST-Ericsson code submissions. This single patch was originally a collection of updates which have been squashed together to aid with clarity. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ARM: ux500: regulators: Add mask for configurationLee Jones2013-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is already before a register mask in the regulator driver to allow some bits of a register to be initialized. The register value is defined in the board configuration. This patch puts a mask in the board configuration to specify which bits should actually be altered. The purpose with this patch is to avoid future mistakes when updating the allowed bits in the regulator driver. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | regulator: ab8500: Further populate initialisation registersLee Jones2013-03-22
|/ / | | | | | | | | | | | | | | | | | | | | This patch supplies access to some extra settings provided by the AB8500 regulator device. We also update some of the existing initialisation values in accordance with internal ST-Ericsson code submissions. This single patch was originally a collection of updates which have been squashed together to aid with clarity. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* / regulator: core: update kernel documentation for regulator_descNishanth Menon2013-03-01
|/ | | | | | | | | | | | | | | | | commit df367931 (regulator: core: Provide regmap get/set bypass operations) introduced regulator_[gs]et_bypass_regmap However structure documentation for regulator_desc needs an update. ./scripts/kernel-doc include/linux/regulator/driver.h >/dev/null generates: Warning(include/linux/regulator/driver.h:233): No description found for parameter 'bypass_reg' Warning(include/linux/regulator/driver.h:233): No description found for parameter 'bypass_mask' Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Allow specify apply_[reg|bit] for regmap based voltage_sel ↵Axel Lin2012-12-24
| | | | | | | | | | | | | operations Some DVM regulators needs to update apply_bit after setting vsel_reg to initiate voltage change on the output. This patch adds apply_reg and apply_bit to struct regulator_desc and update regulator_set_voltage_sel_regmap() to set apply_bit of apply_reg when apply_bit is set. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'regulator/topic/tol' into regulator-nextMark Brown2012-12-10
|\
| * regulator: core: Add regulator_is_supported_voltage_tol()Mark Brown2012-11-14
| | | | | | | | | | | | | | | | If consumers wish to set voltages based on a tolerance it stands to reason that they will also want to query for support in the same manner. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | Merge remote-tracking branch 'regulator/topic/stub' into regulator-nextMark Brown2012-12-10
|\ \
| * | regulator: add missing prototype for regulator_is_supported_voltagePhilip Rakity2012-11-21
| |/ | | | | | | | | | | | | | | | | avoids needs for CONFIG_REGULATOR in sdhci.c Signed-off-by: Philip Rakity <prakity@nvidia.com> Reviewed-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/topic/min' into regulator-nextMark Brown2012-12-10
|\ \
| | \
| | \
| *-. \ Merge branches 'topic/da9055' and 'topic/tps51632' of ↵Mark Brown2012-11-27
| |\ \ \ | | | |/ | | |/| | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-min
| * / | regulator: core: Allow specific minimal selector for starting linear mappingAxel Lin2012-11-27
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers (at least 3 drivers) have such variant of linear mapping that the first few selectors are invalid and the reset are linear mapping. Let's support this case in core. This patch adds linear_min_sel in struct regulator_desc, so we can allow specific minimal selector for starting linear mapping. Then extends regulator_[map|list]_voltage_linear() to support this feature. Note that for selectors less than min_linear_index, we need count them to n_voltages so regulator_list_voltage() won't fail while checking the boundary for selector before calling list_voltage callback. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | Merge remote-tracking branch 'regulator/topic/max8973' into regulator-nextMark Brown2012-12-10
|\ \ \
| * | | regulator: max8973: add regulator driver supportLaxman Dewangan2012-11-19
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAXIM MAX8973 high-efficiency, three phase, DC-DC step-down switching regulator delievers up to 9A of output current. Each phase operates at a 2MHz fixed frequency with a 120 deg shift from the adjacent phase, allowing the use of small magnetic component. Add regulator driver for this device. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | Merge remote-tracking branch 'regulator/topic/hotplug' into regulator-nextMark Brown2012-12-10
|\ \ \
| | \ \
| | \ \
| | \ \
| | \ \
| *---. \ \ Merge branches 'topic/tps51632', 'topic/tps80031', 'topic/vexpress', ↵Mark Brown2012-11-20
| |\ \ \ \ \ | | |_|_|/ / | |/| | | / | | | |_|/ | | |/| | 'topic/max8925', 'topic/gpio' and 'topic/tps65090' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-hotplug
| | | | * regulator: tps65090: Register all regulators in single probe callLaxman Dewangan2012-10-17
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFD driver registers the regulator driver once per device and hence it is require to register all regulators in single probe call. Following are details of changes done to achieve this: - Move the regulator enums to mfd header and remove the tps65090-regulator.h as it does not contain more info. - Add max regulator and register all regulators even if there is no regulator init data from platform. - Convert regulator init data to pointer type in platform data. - Add input supply name in regulator desc to provide input supply. - Separate desc information from driver information. - Disable external control bit to have control through register write. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | | * regulator: core: Support for continuous voltage rangePawel Moll2012-10-15
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some regulators can set any voltage within the constraints range, not being limited to specified operating points. This patch makes it possible to describe such regulator and makes the regulator_is_supported_voltage() function behave correctly. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | * regulator: tps51632: Add tps51632 regulator driverLaxman Dewangan2012-10-15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TPS51632 is a driverless step down controller with serial control. Advanced features such as D-Cap+ architecture with overlapping pulse support and OSR overshoot reduction provide fast transient response, lowest output capacitance and high efficiency. The TPS51632 supports both I2C and DVFS interfaces (through PWM) for dynamic control of the output voltage and current monitor telemetry. Add regulator driver for TPS51632. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* / regulators: add regulator_can_change_voltage() functionMarek Szyprowski2012-12-06
|/ | | | | | | | | | Introduce a regulator_can_change_voltage() function for the subsytems or drivers which might check if applying voltage change is possible and use special workaround code when the driver is used with fixed regulators or regulators with disabled ability to change the voltage. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
*-----. Merge remote-tracking branches 'regulator/topic/core', ↵Mark Brown2012-09-28
|\ \ \ \ | | | | | | | | | | | | | | | 'regulator/topic/bypass', 'regulator/topic/tol', 'regulator/topic/drivers' and 'regulator/topic/tps6586x' into regulator-next
| | | | * regulator: Fairchild fan53555 supportYunfan Zhang2012-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver supports Fairchild FAN53555 Digitally Programmable TinyBuck Regulator. The FAN53555 is a step-down switching voltage regulator that delivers a digitally programmable output from an input voltage supply of 2.5V to 5.5V. The output voltage is programmed through an I2C interface. Signed-off-by: Yunfan Zhang <yfzhang@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | | | * regulator: Update comment for set_current_limit callback of struct regulator_opsAxel Lin2012-08-28
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | The regulators should be tending to the maximum in the available range and consumers should specify the widest range possible. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | | * regulator: add a new API regulator_set_voltage_tol()Shawn Guo2012-08-08
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | There are some use cases where a voltage range could be reasonably specified by a target voltage and tolerance. Add a new API regulator_set_voltage_tol() wrapping regulator_set_voltage() call to ease the users. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | * regulator: core: Provide regmap get/set bypass operationsMark Brown2012-09-10
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | * regulator: core: Support bypass modeMark Brown2012-09-10
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many regulators support a bypass mode where they simply switch their input supply to the output. This is mainly used in low power retention states where power consumption is extremely low so higher voltage or less clean supplies can be used. Support this by providing ops for the drivers and a consumer API which allows the device to be put into bypass mode if all consumers enable it and the machine enables permission for this. This is not supported as a mode since the existing modes are rarely used due to fuzzy definition and mostly redundant with modern hardware which is able to respond promptly to load changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Graeme Gregory <gg@slimlogic.co.uk>
| * regulator: Clarify documentation for regmap in the configMark Brown2012-08-31
|/ | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'regulator-drivers' into regulator-nextMark Brown2012-07-22
|\
| * regulator: fixed: dt: support for input supplyLaxman Dewangan2012-07-05
| | | | | | | | | | | | | | | | | | Add support for input supply in DT parsing of node. The input supply will be provided by the property "vin-supply" in the regulator node. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: core: Add core support for GPIO controlled enable linesMark Brown2012-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is very common for regulators to support having their enable signal controlled by a GPIO. Since there are a bunch of fiddly things to get right like handling the operations when the enable signal is tied to a rail and it's just replicated code add support for this to the core. Drivers should set ena_gpio in their config if they have a GPIO control, using ena_gpio_flags to specify any flags (including GPIOF_OUT_INIT_ for the initial state) and ena_gpio_invert if the GPIO is active low. The core will then override any enable and disable operations the driver has and instead control the specified GPIO. This will in the future also allow us to further extend the core by identifying when several enable signals have been tied together and handling this properly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: core: Allow fixed enable_time to be set in the regulator_descMark Brown2012-07-03
| | | | | | | | | | | | | | | | Many regulators have a fixed specification for their enable time. Allow this to be set in the regulator_desc as a number to save them having to implement an explicit operation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: add new regulator driver for lp872xKim, Milo2012-06-19
| | | | | | | | | | | | | | | | This driver supports TI/National LP8720, LP8725 PMIC. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Reviewed-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: core: Change the unit of ramp_delay from mV/uS to uV/uSAxel Lin2012-06-18
| | | | | | | | | | | | | | | | This change makes it possible to set ramp_delay with 0.xxx mV/uS without truncation issue. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: Add ramp_delay configuration to constraintsYadwinder Singh Brar2012-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some hardwares ramp_delay for BUCKs is a configurable parameter which can be configured through DT or board file.This patch adds ramp_delay to regulator constraints and allow user to configure it for regulators which supports this feature, through DT or board file. It will provide two ways of setting the ramp_delay for a regulator: First, by setting it as constraints in board file(for configurable regulators) and set_machine_constraints() will take care of setting it on hardware by calling(the provided) .set_ramp_delay() operation(callback). Second, by setting it as data in regulator_desc(as fixed/default ramp_delay rate) for a regulator in driver. regulator_set_voltage_time_sel() will give preference to constraints->ramp_delay while reading ramp_delay rate for regulator. Similarly users should also take care accordingly while refering ramp_delay rate(in case of implementing their private .set_voltage_time_sel() callbacks for different regulators). [Rewrote subject for 80 columns -- broonie] Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: core: Add regulator_set_voltage_time_sel to calculate ramp delay.Yadwinder Singh Brar2012-06-11
| | | | | | | | | | | | | | | | | | | | This patch adds regulator_set_voltage_time_sel(), to move into core, the commonly used code by drivers to provide the .set_voltage_time_sel callback. It will also allow us to configure different ramp delay for different regulators easily. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| |
| \
*-. \ Merge branches 'regulator-core', 'regulator-dt' and 'regulator-dummy' into ↵Mark Brown2012-07-22
|\ \ \ | | | | | | | | | | | | regulator-next
| | * | regulator: extend the fixed dummy voltage regulator to accept voltageGuennadi Liakhovetski2012-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivially extend the regulator_register_always_on() helper function to be even more useful by adding a voltage parameter to it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | * | regulator: support multiple dummy fixed regulatorsGuennadi Liakhovetski2012-06-19
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently regulator_register_fixed() uses a constant name to register a fixed dummy regulator. This is sufficient in principle, since there is no reason to register multiple such regulators. The user can simply supply all consumers in one array and use it to initialise such a regulator. However, in some cases it can be convenient to register multiple such regulators. This is also a prerequisite for the upcoming patch, that will add a voltage parameter to this function. The original function is provided as a wrapper macro. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | regulator: Add REGULATOR_STATUS_UNDEFINED.Krystian Garbaciak2012-07-12
| | | | | | | | | | | | | | | | | | | | | | | | REGULATOR_STATUS_UNDEFINED is to be returned by regulator, if any other state doesn't really apply. Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | regulator: add missing defintion regulator_is_supported_voltagePhilip Rakity2012-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This definition is missing when CONFIG_REGULATOR is not defined. This causes compiler errors when compiling sdhci.c. This can be worked around by adding #ifdef CONFIG_REGULATOR .. #endif but since other definitions are there we have defined the missing definition Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | regulator: stubs: Make stub regulator_get_voltage() return an errorMark Brown2012-06-18
| |/ |/| | | | | | | | | | | | | Returning 0 isn't useful, it's not even meaningful if there is a real regulator there. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | regulator: core: Allow drivers to set voltage mapping table in regulator_descAxel Lin2012-06-03
|/ | | | | | | | | | Some regulator hardware use table based mapping can set volt_table in regulator_desc and use regulator_list_voltage_table() for their list_voltage callback. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: support force PWM mode via regulator modeLaxman Dewangan2012-05-14
| | | | | | | | | | Change the mechanism of enabling the force PWM mode through regulator set mode. This can be dynamically configured now. In the REGULATOR_MODE_FAST the force PWM is enabled and in REGULATOR_MODE_NORMAL the force PWM is disabled. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: make init_data of platform data to pointer.Laxman Dewangan2012-05-13
| | | | | | | | | | | 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>
* regulator: core: Allow drivers to set simple linear voltage maps as dataMark Brown2012-05-12
| | | | | | | | | | | | | | 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>
* regulator: core: Allow regulators to provide a voltage to selector mappingMark Brown2012-05-12
| | | | | | | | | | | | 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>
* Merge remote-tracking branch 'regulator/topic/drivers' into regulator-nextMark Brown2012-05-12
|\ | | | | | | | | Conflicts: drivers/regulator/88pm8607.c (simple overlap with a bugfix in v3.4)
| * regulator: Add generic DT parsing for regulatorsThierry Reding2012-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>