Age | Commit message (Collapse) | Author | Files | Lines |
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Reviewed-by: Mattias NILSSON <[email protected]>
Reviewed-by: Jonas ABERG <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Reviewed-by: Yvan FILLION <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
bits to disable
Add enable_is_inverted flag to indicate set enable_mask bits to disable
when using regulator_enable_regmap and friends APIs.
Signed-off-by: Axel Lin <[email protected]>
Reviewed-by: Haojian Zhuang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The regulator_dev has regulator_enable_gpio structure.
'ena_gpio' and 'ena_gpio_invert' were moved to in regulator_enable_gpio.
regulator_dev ---> regulator_enable_gpio
.ena_gpio .gpio
.ena_gpio_invert .ena_gpio_invert
Pointer, 'ena_pin' is used for checking valid enable GPIO pin.
Signed-off-by: Milo(Woogyom) Kim <[email protected]>
Reviewed-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
A Regulator can be enabled by external GPIO pin.
This is configurable in the regulator_config.
At this moment, the GPIO can be owned by only one regulator device.
In some devices, multiple regulators are enabled by shared one GPIO pin.
This patch extends this limitation, enabling shared enable GPIO of regulators.
New list for enable GPIO: 'regulator_ena_gpio_list'
This manages enable GPIO list.
New structure for supporting shared enable GPIO: 'regulator_enable_gpio'
The enable count is used for balancing GPIO control count.
This count is incremented when GPIO is enabled.
On the other hand, it's decremented when GPIO is disabled.
Reference count: 'request_count'
The reference count, 'request_count' is incremented/decremented on
requesting/freeing the GPIO. This count makes sure only free the GPIO
when it has no users.
How it works
If the GPIO is already used, skip requesting new GPIO usage.
The GPIO is new one, request GPIO function and add it to the list of
enable GPIO.
This list is used for balancing enable GPIO count and pin control.
Updating a GPIO and invert code moved
'ena_gpio' and 'ena_gpio_invert' of the regulator_config were moved to
new function, regulator_ena_gpio_request().
Use regulator_enable_pin structure rather than regulator_dev.
Signed-off-by: Milo(Woogyom) Kim <[email protected]>
Reviewed-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
It's generally important that devices have power when they expect it so
drivers really ought to be checking for errors on the power up paths.
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: [email protected]
Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-min
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
avoids needs for CONFIG_REGULATOR in sdhci.c
Signed-off-by: Philip Rakity <[email protected]>
Reviewed-by: Eric Miao <[email protected]>
Signed-off-by: Eric Miao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
'topic/max8925', 'topic/gpio' and 'topic/tps65090' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-hotplug
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
'regulator/topic/bypass', 'regulator/topic/tol', 'regulator/topic/drivers' and 'regulator/topic/tps6586x' into regulator-next
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Graeme Gregory <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
|
|
regulator-next
|
|
REGULATOR_STATUS_UNDEFINED is to be returned by regulator, if any other state
doesn't really apply.
Signed-off-by: Krystian Garbaciak <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
|
|
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 <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
This driver supports TI/National LP8720, LP8725 PMIC.
Signed-off-by: Milo(Woogyom) Kim <[email protected]>
Reviewed-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Returning 0 isn't useful, it's not even meaningful if there is a real
regulator there.
Reported-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
This change makes it possible to set ramp_delay with 0.xxx mV/uS without
truncation issue.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|