This makes _regulator_enable() properly handle the case where
a regulator is already on when you try to enable it. Currently
it will erroneously handle positive return values as an error.
Signed-off-by: Linus Walleij <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Fixes the following errors on both tps650xx regulator drivers :-
drivers/regulator/tps65023-regulator: struct i2c_device_id is 32 bytes. The last of 1 is:
0x74 0x70 0x73 0x36 0x35 0x30 0x32 0x33 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
FATAL: drivers/regulator/tps65023-regulator: struct i2c_device_id is not terminated with a NULL entry!
This patch also fixes the GPL v2 licence string for both drivers.
Signed-off-by: Liam Girdwood <[email protected]>
Adding TPS65023 and TPS6507x regulator driver support in
drivers/regulator/Makefile and drivers/regulator/Kconfig
Signed-off-by: Anuj Aggarwal <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Now fixed regulators that have their enable pin connected to a GPIO line
can use the fixed regulator driver for regulator enable/disable control.
The GPIO number and polarity information is passed through platform data.
GPIO enable control is achieved using gpiolib.
Signed-off-by: Roger Quadros <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
This patch implements list_voltage for the pcf50644 regulator driver.
As the voltages are linearly scaled the code to convert register values to
voltages can be reused and most of the code can be shared with get_voltage.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
The regulator_enable() code wasn't actually checking that the
machine constraints had given permission to enable the regulator.
Add code to do that, but only if the regulator is not already on
due to something like always_on or being left on at startup since
in those cases there's no physical change being introduced and the
constraint wouldn't make any sense.
Also add matching code for disable(). We need to do less there since
either regulator_enable() should have succeeded first or the board
setup makes no sense.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Report errors to the user and try harder to clean up if we're not
able to probe.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
The patch to add support for looking up consumers by device name
had the side effect of causing us to require a device which is
at best premature since at least cpufreq still operates outside
the device model. Remove that requirement.
Reported-by: Haojian Zhuang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
We're probably going to start oopsing fairly soon after this happens.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Simplify checking of support for voltage ranges by providing an API which
wraps the existing count and list operations.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Some consumers require complete control of the regulator and can't
tolerate sharing it with other consumers, most commonly because they need
to have the regulator actually disabled so can't have other consumers
forcing it on. This new regulator_get_exclusive() API call allows these
consumers to explicitly request this, documenting the assumptions that
they are making.
In order to simplify coding of such consumers the use count for regulators
they request is forced to match the enabled state of the regulator when
it is requested. This is not possible for consumers which can share
regulators due to the need to keep track of the ownership of use counts.
A new API call is used rather than an additional argument to the existing
regulator_get() in order to avoid merge headaches with driver code in
other trees.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
In PXA3xx SoC family, V_CORE power doamin is supplied by BUCK1 that is
controller by ADTV1 or ADTV2 register.
By default, v1 and v2 has the same copy. If v1 or v2 is updated, the last
value that is written to either register takes effect. It means that v1
and v2 has different copy. And the actual voltage output is determinated
by last update on either register.
DA9034/35 is binded with PXA3xx SoC family. While SoC is scaling OP or
entering/exiting lower power mode, SoC needs to change voltage of V_CORE
power doamin. In order to be efficient, POWER I2C (hardcode) mode could
be enabled in SoC. In this mode, SoC will control v2 register directly.
In original DA903x driver, software will only read regulator data from v1
register. But SoC controls v2 register directly. It results that v1 and v2
isn't synchronized. Wrong data will be read from v1 register. So access v2
register in da903x driver instead.
Signed-off-by: Haojian Zhuang <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
BUCK3 is the new component in DA9035. So there're three BUCKs in DA9035.
And there're two BUCKs in DA9034.
Signed-off-by: Haojian Zhuang <[email protected]>
Acked-by: Mark Brown <[email protected]>
Acked-by: Eric Miao <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Follow the approach suggested by Russell King and implemented by him in
the clkdev API and allow consumer device supply mapings to be set up
using the dev_name() for the consumer instead of the struct device.
In order to avoid making existing machines instabuggy and creating merge
issues the use of struct device is still supported for the time being.
This resolves problems working with buses such as I2C which make the
struct device available late providing that the final device name is
known, which is the case for most embedded systems with fixed setups.
Consumers must still use the struct device when calling regulator_get().
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
This makes it easier to read the logs when doing testing.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
The core will no longer complain so we should log an error here.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
This sets the number of voltages for the AB3100 regulators so that
they play well with the voltage listing functions and can be used
properly with the MMC regulator integration glue for example.
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This adds support for the regulators found in the AB3100
Mixed-Signal IC.
It further also defines platform data for the ST-Ericsson
U300 platform and extends the AB3100 MFD driver so that
platform/board data with regulation constraints and an init
function can be passed down all the way from the board to
the regulators.
Signed-off-by: Linus Walleij <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This driver provides basic support for the voltage regulators
integrated into the Freescale MC13783 PMIC. It is currently
only possible to enable/disable outputs, not to actually
set the voltage.
Signed-off-by: Sascha Hauer <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Right now the pcap core driver passes a reference to its pcap data abusing the
subdrivers platform drvdata, this is not good.
Get the reference directly from the parent device.
Signed-off-by: Antonio Ospite <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The WM831x series of PMICs provide two constant current sinks
designed to drive strings of serially connected LEDs for applications
such as backlights. This driver adds support for those regulators.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The WM831x series of PMICs include a single DC-DC boost convertor.
This adds basic support for this convertor.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The WM831x series of PMICs provide two optional outputs for
controlling external devices during power sequencing, for example
an external regulator. While in essence these are GPIOs the
hardware presents them as DCDCs with very little control so
provide support via the regulator API in that fashion.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The WM831x series of devices provide three types of LDO:
- General purpose LDOs supporting voltages from 0.9-3.3V
- High performance analogue LDOs supporting voltages from 1-3.5V
- Very low power consumption LDOs intended to support always on
functionality.
This patch adds support for all three kinds of LDO. Each regulator
is probed as an individual platform device with resources used to
provide the register map location of the regulator. Mixed hardware
and software control of regulators is not current supported.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The WM831x series of devices all have 3 DC-DC buck convertors. This
driver implements software control for these regulators via the
regulator API. Use with split hardware/software control of individual
regulators is not supported, though regulators not controlled by
software may be controlled via the hardware control interfaces.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This is useful for implementing get_status() in terms of get_mode().
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Add (partial) support for the voltage regulators on the PCAP2 PMIC.
Signed-off-by: Daniel Ribeiro <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
On Thu, May 28, 2009 at 10:59 AM, Mark Brown <[email protected]> wrote:
> On Thu, May 28, 2009 at 07:15:16AM +0200, Philipp Zabel wrote:
>> The V3 regulator can be configured with an external resistor
>> connected to the feedback pin (R24 in the data sheet) to
>> increase the voltage range.
>>
>> For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
>> V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.
>>
>> Signed-off-by: Philipp Zabel <[email protected]>
>
> Looks good.
>
> Acked-by: Mark Brown <[email protected]>
Thanks, but it turns out I hit a 32 bit integer overflow in
the gain calculation. I'd like to mend that with the following
patch. Now max_uV could be increased up to 4.294 V, enough to
charge LiPo cells.
Signed-off-by: Philipp Zabel <[email protected]>
Acked-by: Robert Jarzmik <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
The V3 regulator can be configured with an external resistor
connected to the feedback pin (R24 in the data sheet) to
increase the voltage range.
For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.
Signed-off-by: Philipp Zabel <[email protected]>
Acked-by: Mark Brown <[email protected]>
Acked-by: Robert Jarzmik <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
lp3971_i2c_remove' referenced in section `.data' of drivers/built-in.o:
defined in discarded section `.devexit.text' of drivers/built-in.o
Signed-off-by: Liam Girdwood <[email protected]>
This patch adds regulator drivers for National Semiconductors LP3971 PMIC.
This LP3971 PMIC controller has 3 DC/DC voltage converters and 5 low
drop-out (LDO) regulators. LP3971 PMIC controller uses I2C interface.
Reviewed-by: Kyungmin Park <[email protected]>
Signed-off-by: Marek Szyprowski <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>