Age | Commit message (Collapse) | Author |
|
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Helps with figuring out when things went wrong.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Some Arizona device support a 1.8V output mode. Enable this in the driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
The number of voltage slots supported by the LDO is 7, not 6.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Some Arizona devices such as the WM5102 can use DVFS on their digital core,
for these devices allow the voltage range to vary in the default setup.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Below equation means the "voltage" is the "smallest" voltage within specific
range.
ret = DIV_ROUND_UP(min - bottom) / step;
voltage = ret * step + bottom;
If we do try 1 down when (voltage > max), new voltage is then less than min
voltage. Which means the new voltage is not in the requested voltage range.
This patch also includes below cleanups:
- Use DIV_ROUND_UP
- rename variable 'ret' to 'sel' for better readability because as3711_sel_check
returns the selector.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Below cases are supposed to be valid:
min_uV == max_uV == info->max_uV
min_uV == max_uV == rdev->desc->min_uV
Don't return -EINVAL for above cases.
This patch also includes below cleanups:
- Use rdev_get_drvdata(rdev) instead of rdev->reg_data.
- Remove unnecessary WARN_ON, it looks pointless.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This patch fix the abnormal ramp delay setting.
The shift operation was wrong.
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
|
|
Checking da9052_current_limits[row][i] <= max_uA is not enough, it is possible
da9052_current_limits[row][i] may less than the requested min_uA.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
set_current_limit
Selecting the minimal value is only true for voltage regulators.
For current regulators the maximum in the given range should be
selected instead.
This issue was reported by Heiko Stuebner for gpio-regulator driver [1],
and the conclusion is to select the max current for current regulators [2].
[1] https://lkml.org/lkml/2012/8/5/162
[2] https://lkml.org/lkml/2012/8/6/183
This patch also ensures da9055_buck_set_current_limit return -EINVAL when the
supported current limit does not meet the request range.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
When building the driver in debug mode, it generates
warning as
drivers/regulator/tps6586x-regulator.c: In function 'tps6586x_regulator_probe':
drivers/regulator/tps6586x-regulator.c:392:9: warning: 'id' is used uninitialized in this function [-Wuninitialized]
Fix this warning.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
When tps->enable_pwm_dvfs is true, write to TPS51632_VOLTAGE_BASE_REG rather
than TPS51632_VOLTAGE_SELECT_REG.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-min
|
|
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
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>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-max8997
Conflicts:
drivers/regulator/max8997.c
|
|
Add device tree based discovery support for max8997.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
In case the gpio based volatage selection mode is not used for either of
buck 1/2/5, then only the BUCKxDVS1 register need to be programmed. So
determine whether dvs mode is used and limit the loop count appropriately.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
The BUCKxDVSx register programming is now moved prior to setting up of the
gpio based dvs mode. This will ensure that all the BUCKxDVSx registers
are programmed with appropriate voltage values before the gpio based dvs
mode is selected for buck1/2/5.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This driver can be built as a module, add MODULE_ALIAS for it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
If external control is enabled then do not provide regulator
enable/disable apis.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This driver supports the 4 DCDC and 8 LDO regulators on the AS3711 PMIC.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
regulators
Implement list_voltage for fixed regulators, otherwise
regulator_is_supported_voltage() returns 0.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This patch includes below cleanups:
- Fix typo in comment
- Fix showing wrong register in dev_err
- Remove unnecessary rinfo variable
- Add TPS80032 to MODULE_DESCRIPTION
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
offset
This patch implements map_voltage and list_voltage callbacks to properly handle
the case voltage range that doesn't start with 0 offset.
Now we adjust the selector in map_voltage() before calling set_voltage_sel().
And return 0 in list_voltage() for invalid selectors.
With above change, we can remove da9055_regulator_set_voltage_bits function.
One tricky part is that we need adding voffset to n_voltages.
Although for the cases "selector < voffset" are invalid, we need add voffset to
n_voltage 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>
Tested-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-hotplug
Conflicts:
drivers/regulator/tps6586x-regulator.c
|
|
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
'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 <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Check pdata->gpio_rsel && pdata->gpio_rsel[id] for the case GPI pin is muxed
with regulator to select the regulator register set A/B for voltage ramping.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Pefix "TPS80031" is added on all defines of tps80031 header
to avoid conflict with other header definitions.
Update the regualtor driver of tps80031 to use the same name.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This is the Regulator patch for the DA9055 PMIC and has got dependency on
the DA9055 MFD core.
This patch support all of the DA9055 regulators. The output voltages are
fully programmable through I2C interface only. The platform data with regulation
constraints is passed down from the board to the regulator.
This patch is functionaly tested on SMDK6410 board. DA9055 Evaluation board
was connected to the SMDK6410 board.
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Moving regulator node parsing to regulator driver in place
of parsing it on mfd driver.
The motivation for this change are:
- MFD core driver should not depends on regulator and able
to instantiate device without regulator.
- The API for matching regulators are in regulator core and
it is good that regulator driver only calls this API.
- Regulator specific support should be in regulator driver only
to ease any enhancement/modification for regulators.
- The regulator driver is now registered as mfd sub device and
all regulator registration is done from single probe call.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
'regulator/fix/supp-volt' into tmp
|
|
regulator_is_supported_voltage() should return true only if the voltage
of fixed/constant regulator is between min_uV and max_uV.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
|
|
A selection of voltage or current values (AKA states) should always
be specified when using a GPIO regulator. If there are no switchable
states then the fixed regulators should be used instead.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
When regulator_register fails and exits through the scrub path the
regulator_put function was called whilst holding the
regulator_list_mutex, causing deadlock.
This patch adds a private version of the regulator_put function which
can be safely called whilst holding the mutex, replacing the
aforementioned call.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Need initilize of_node in regulator config when register regulator,
otherwise regulator driver think it is no-dt device.
in regulator_dev_lookup
list_for_each_entry(r, ®ulator_list, list)
if (r->dev.parent &&
node == r->dev.of_node)
return r
r->dev.of_noe will be zero if miss config in cfg.
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Add regulator driver for Texas Instrument TPS80031/TPS80032 device.
TPS80031/ TPS80032 Fully Integrated Power Management with Power
Path and Battery Charger. It has 5 configurable step-down
converters, 11 general purpose LDOs, VBUS generator and digital
output to control regulators.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
If the gpio_request_one() fails, or returns EPROBE_DEFER, the
regulator must be device_unregister()ed. When this is not done,
there are WARNING: from sysfs:
WARNING: at fs/sysfs/file.c:343 sysfs_open_file+0x238/0x268()
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This patch fixes a sparse warning. Since max77686_enable() is a callback,so it
should be static.
Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Here we provide the GPIO Regulator driver with Device Tree capability, so
that when a platform is booting with DT instead of platform data we can
still make full use of it.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|