17 Dec, 2009
26 commits
-
ret should be signed to notice a failure in wm831x_reg_read().
Signed-off-by: Roel Kluin
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
This change makes sure all regulator group assignments are cleared on
disable callSigned-off-by: Juha Keski-Saari
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
This change implements a basic turnon delay in the regulator enable function
to make it less probable that reg_enable returns before the regulator
output is at target levelSigned-off-by: Juha Keski-Saari
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
This change ensures the regulator REMAP register configuration is in a known
state so state transitions will function as intended regardless of
possible bootloader effects on itSigned-off-by: Juha Keski-Saari
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
This change includes regulator turnon delay values and the REMAP reset
configuration to the twlreg_info struct, since they are basic attributes
of every TWL regulatorSigned-off-by: Juha Keski-Saari
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
Defines VIO, VDD1, VDD2, VPLL1 and VINT* regulators as always_on by default
since they are critical to TWL and its master's functionality and should
be on in all cases where RegFW is usedSigned-off-by: Juha Keski-Saari
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
Define all twl4030 regulators in the twlreg_info table, along with
appropriate VSEL tables for adjustable regulatorsSigned-off-by: Juha Keski-Saari
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
When the mc13783-regulator driver is built in kernel, probing it during
the regulator subsystem initialisation result in a fault.That is because regulator subsystem is planned to be initialised very early
in the boot process, before the mfd subsystem initialisation.The mc12783-regulator probing process need to access to the mc13783-core
functionality to read/write mc13783 registers and so must be called after
the mc13783-core driver initialisation.The way to do this is to let the kernel probe the mc13783-regulator driver when
mc13783-core register his regulator subdevice.Signed-off-by: Alberto Panizzo
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
Currently it is possible for regulator_bulk_{enable,disable} operations to
generate unbalanced regulator_{disable,enable} calls in its error path.
In case of an error only those regulators of the bulk operation which actually
had been enabled/disabled should get their original state restored.Signed-off-by: Lars-Peter Clausen
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
Signed-off-by: Stefan Roese
Cc: Liam Girdwood
Cc: Mark Brown
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
IS_ERR returns only 1 or 0. The callsite of setup_regulators expects a
negative integer in an error case. Thus, PTR_ERR has to be used to extract
it.The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression E,E1;
@@*E = IS_ERR(...)
... when != E = E1
*return E;
//Signed-off-by: Julia Lawall
Acked-by:
Signed-off-by: Liam Girdwood -
- define needed registers and bits in the driver
- properly namespace functions and structs
- fix locking as required by patch
"mfd/mc13783: near complete rewrite"
- use platform_data as provided by "mfd/mc13783: near complete rewrite"
instead of accessing struct mc13783
- struct mc13783_regulator_priv.desc is (and was) unused and so can go
away
- use cpp magic to initialize mc13783_regulators
- bring MODULE_LICENSE in sync with actual copyright
- minor style fixesThis allows not including mc13783-private.h which I intend to remove
soon.Signed-off-by: Uwe Kleine-König
Cc: Sascha Hauer
Cc: Liam Girdwood
Cc: Mark Brown
Cc: Samuel Ortiz
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
One annoying thing about the old name was that the module was just
called mc13783 which caused wrong expectations (at least for me).Signed-off-by: Uwe Kleine-König
Cc: Sascha Hauer
Cc: Liam Girdwood
Cc: Mark Brown
Cc: Samuel Ortiz
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
This patch will remove surplus register writes on shut down of
LDO D (this magic was not needed), remove an unnecessary (!) error
check and really unregister the regulators when the module is
unloaded.Signed-off-by: Linus Walleij
Signed-off-by: Liam Girdwood -
If selector equals ARRAY_SIZE(da9034_ldo12_data), that is one too
large already.Signed-off-by: Roel Kluin
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
If we fall through it means that we hit an unknown regulator/chip
combination so set -ENOENT as an explicit flag (the return code
is only used internally).Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood -
'static const int const' means the same thing as 'static const int'
and sparse complains about this.Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood -
Since some regulators in the system may not support suspend mode
configuration we need to allow some regulators to have a missing
suspend mode configuration. Do this by requiring that disabled
regulators are explicitly flagged and then skip over regulators
that have no state specified.Try to avoid surprises by warning the if we could set the state
but no configuration is provided. This also ensures that an all
zeros configuration generates a warning rather than silently
disabling the regulator.Reported-by: Joonyoung Shim
Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood -
Some of the regulator API functions have code to allow the machine
constraints to override the device supplied name for the regulator
in the constraints in order to help tie logging to supplies on the
board and disambiguate when there is more than one regulator chip
in the system. Factor this code out into a new rdev_get_name()
function and use it throughout the regulator API so that we always
use the same name.Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood -
When voltage or current constraints are either missing or specify
a range display the actual setting along with the constraints if
we can. This can aid debugging of configuration problems.Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood -
It makes sense to do all the voltage configuration in the one split
out function.Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood -
This allows constraints to take effect on regulators that support
voltage setting but for which the board does not specify a voltage
range (for example, because it is fixed correctly at system startup).Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood -
If we're going to log an error we may as well log what the error
code that we're failing on is.Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood -
Hi Liam,
Since Samuel merged a new version of mfd 88pm8607 driver, I format a
new patch on regulator 88pm8607. I paste the new patch in mail. Please
help to review again. And I also attach the mfd driver in mail.From: Haojian Zhuang
Date: Thu, 8 Oct 2009 09:36:53 -0400
Subject: [PATCH] regulator: Add 88PM8607 PMIC driverThis patch adds regulator drivers for Marvell 88PM8607 PMIC.
This controller contains 3 DVC and 14 LDO regulators. This controller
uses I2C interface.Signed-off-by: Haojian Zhuang
Signed-off-by: Liam Girdwood -
The BuckWise DC-DC convertors in WM831x devices support switching to
a second output voltage using the logic level on one of the device
pins. This is intended to allow rapid voltage switching for uses like
cpufreq, replacing the I2C or SPI write used to configure the voltage
of the regulator with a much faster GPIO status change.This is implemented by keeping the DVS voltage configured as the
maximum voltage permitted for the regulator. If a request is made
for the maximum voltage then the GPIO is used to switch to the DVS
voltage, otherwise the normal ON voltage is updated and used. This
follows the idiom used by most cpufreq drivers, which drop the
minimum voltage as the core frequency is dropped but use a constant
maximum - raising the voltage should normally be fast, but lowering
it may be slower.Configuration of the DVS MFP on the device should be done externally,
for example via OTP.Support is present in the hardware for monitoring the status of the
transition using a second GPIO. This is not currently implemented
but platform data is provided for it - the driver currently assumes
that the device will be configured to transition immediately - but
platform data is provided to reduce merge issues once it is.Signed-off-by: Mark Brown
Acked-by: Samuel Ortiz
Signed-off-by: Liam Girdwood -
Tested with a MX25-based custom board.
Signed-off-by: Wolfram Sang
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood
14 Dec, 2009
7 commits
-
This patch updates the regulator driver to add support
for TWL6030 PMIC specific LDO regulators.
SMPS resources are not yet supported for TWL6030 and
also .set_mode and .get_status for LDO's are yet to
be implemented for TWL6030.Signed-off-by: Rajendra Nayak
Signed-off-by: Balaji T K
Acked-by: Mark Brown
Reviewed-by: Tony Lindgren
Signed-off-by: Samuel Ortiz -
This patch renames all twl4030_ functions to twl so that regulator driver
can be reused by Triton - TWL4030 and Phoenix - TWL6030.Signed-off-by: Rajendra Nayak
Signed-off-by: Balaji T K
Signed-off-by: Santosh Shilimkar
Acked-by: Kevin Hilman
Acked-by: Mark Brown
Signed-off-by: Samuel Ortiz -
This patch renames function names like twl4030_i2c_write_u8,
twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8
and also common variable in twl-core.cSigned-off-by: Rajendra Nayak
Signed-off-by: Balaji T K
Signed-off-by: Santosh Shilimkar
Acked-by: Kevin Hilman
Signed-off-by: Samuel Ortiz -
The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030
for OMAP3. The common modules like RTC, Regulator creates opportunity
to re-use the most of the code from twl4030.This patch renames few common drivers twl4030* files to twl* to enable
the code re-use.Signed-off-by: Rajendra Nayak
Signed-off-by: Balaji T K
Signed-off-by: Santosh Shilimkar
Acked-by: Kevin Hilman
Signed-off-by: Samuel Ortiz -
Bring the WM8350 IRQ API more in line with the generic IRQ API by
masking and unmasking interrupts as they are requested and freed.
This is mostly just a case of deleting the mask and unmask calls
from the individual drivers.The RTC driver is changed to mask the periodic IRQ after requesting
it rather than only unmasking the alarm IRQ. If the periodic IRQ
fires in the period where it is reqested then there will be a
spurious notification but there should be no serious consequences
from this.The CODEC drive is changed to explicitly disable headphone jack
detection prior to requesting the IRQs. This will avoid the IRQ
firing with no jack set up.Signed-off-by: Mark Brown
Signed-off-by: Samuel Ortiz -
This is done as simple code transformation, the semantics of the
IRQ API provided by the core are are still very different to those
of genirq (mainly with regard to masking).Signed-off-by: Mark Brown
Signed-off-by: Samuel Ortiz -
Currently the pcf50633-regulator driver data is set to the pcf50633 core
structure, but the pcf50633-regulator remove handler assumes that it is set to
the regulator device. This patch fixes the issue by accessing the pcf506533
core structure through its parent device and setting the driver data to the
regulator device.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Paul Fertser
Signed-off-by: Samuel Ortiz
03 Dec, 2009
1 commit
-
The version that made it into mainline missed the initialisation of the
chip handle.Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood
16 Nov, 2009
3 commits
-
Don't dereference drvdata after it has been freed.
regards,
dan carpenterSigned-off-by: Dan Carpenter
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
If ret is unsigned, the checks for negative wm831x_reg_read() return values
are wrong. The error value should be transmitted to its caller, e.g.
wm831x_gp_ldo_get_status() which tests for a negative return value.Signed-off-by: Roel Kluin
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood
22 Sep, 2009
3 commits
-
Signed-off-by: Roel Kluin
Signed-off-by: Haojian Zhuang
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
Signed-off-by: Wolfram Sang
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
Specifying 'default n' is superfluous.
Signed-off-by: Wolfram Sang
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood