Commit Graph

1305 Commits (88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7)

Author SHA1 Message Date
Axel Lin 7fa8a59757 regulator: tps80031: Convert tps80031_ldo_ops to linear_min_sel and list_voltage_linear
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-07 15:24:12 +09:00
Axel Lin 40b5aa8f0d regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode
To clear the mask bit, setting data argument to be 0 with proper mask setting
for lp8788_update_bits. We don't need the var array here.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-07 14:24:13 +09:00
Axel Lin ec4f7b88b4 regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match
Use of_match_ptr and add ifdef CONFIG_OF guard for regulator_gpio_of_match.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-06 15:22:52 +09:00
Axel Lin bdc4baaceb regulator: palmas: Convert palmas_ops_smps to regulator_[get|set]_voltage_sel_regmap
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-06 15:20:53 +09:00
Axel Lin ad02e84687 regulator: palmas: Return raw register values as the selectors in [get|set]_voltage_sel
Don't adjust the selector in [get|set]_voltage_sel, fix it in list_voltage() instead.

For smps*(except smps10), the vsel reg-value and voltage mapping as below:

reg-value       volt (uV) ( Assume RANGE is x1 )
0               0
1               500000
2               500000
3               500000
4               500000
5               500000
6               500000 (0.49V + 1 * 0.01V) * RANGE
7               510000 (0.49V + 2 * 0.01V) * RANGE
8               520000 (0.49V + 3 * 0.01V) * RANGE
9               530000 (0.49V + 4 * 0.01V) * RANGE
....

The linear mapping is start from selector 6.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-06 15:20:52 +09:00
Marek Szyprowski d1e7de3007 regulators: add regulator_can_change_voltage() function
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>
2012-12-06 15:13:34 +09:00
Axel Lin dbc705183a regulator: tps51632: Ensure [base|max]_voltage_uV pdata settings are valid
If pdata->base_voltage_uV is missing or the settings of pdata->base_voltage_uV
and pdata->max_voltage_uV are out of range, TPS51632_VOLT_VSEL macro
returns wrong vsel.

Thus add checking [base|max]_voltage_uV pdata settings in probe.

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>
2012-12-03 00:15:14 +09:00
Axel Lin 43f1f2165e regulator: wm831x-dcdc: Add MODULE_ALIAS for wm831x-boostp
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-03 00:14:23 +09:00
Axel Lin 1a679930e1 regulator: wm831x-dcdc: Ensure selected voltage falls within requested range
Use DIV_ROUND_UP to ensure selected voltage won't less than min_uV due to
integer truncation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-03 00:12:08 +09:00
Mark Brown 5d6e6ffc40 Merge branch 'topic/tps51632' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-min
Conflicts:
	drivers/regulator/tps51632-regulator.c
2012-11-28 19:24:48 +00:00
Axel Lin bd0ec7c1e5 regulator: tps51632: Use linear_min_sel and regulator_[map|list]_voltage_linear
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>
2012-11-28 19:21:32 +00:00
Axel Lin 05cf34c1af regulator: pcf50633: Use linear_min_sel and regulator_[map|list]_voltage_linear
This driver can be converted to use linear_min_sel and
regulator_[map|list]_voltage_linear.

Below shows the equation (from Datasheet) for each LDOs.

For AUTOOUT:
        VO(prog) = 0.625 + auto_out x 0.025 V; e.g.
        (00000000 to 00101110: reserved)
        00101111: 1.8 V (min)
        01010011: 2.7 V
        01101010: 3.275 V
        01101011: 3.300 V
        01101100: 3.325 V
        01111111 : 3.800 V (max)

        The linear mapping start from 0x2f selector.

        Thus we convert this equation to:
        VO(prog) = 1.8 + (selector - linear_min_sel) x 0.025 V
        (min_uV = 1800000, uV_step = 25000, linear_min_sel = 0x2f)

For DOWNxOUT:
        VO(prog) = 0.625 + downx_out x 0.025 V; e.g.
        00000000 : 0.625 V (min)
        00010111 : 1.200 V
        00101111 : 1.800 V
        01011111 : 3.000 V (max)

For xLDOOUT:
        VO(prog) = 0.9 + xldo_out x 0.1 V; e.g.
        00000: 0.9 V
        00001: 1.0 V
        11000 : 3.3 V
        11011 : 3.6 V

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 19:21:00 +00:00
Mark Brown 9507281855 regulator: arizona-micsupp: Add ramp time information
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 17:48:01 +00:00
Mark Brown fff15bef48 regulator: core: Say what unsupportable voltage constraints are
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 17:47:35 +00:00
Mark Brown dd8004af2b regulator: core: Log when a device causes a voltage constraint fail
Helps with figuring out when things went wrong.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 17:47:18 +00:00
Mark Brown 73ee29460e regulator: arizona-ldo1: Support 1.8V mode
Some Arizona device support a 1.8V output mode. Enable this in the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 17:30:36 +00:00
Mark Brown 8a7f0c61c0 regulator: arizona-ldo1: Add additional top voltage
The number of voltage slots supported by the LDO is 7, not 6.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 17:30:33 +00:00
Mark Brown 55a18aef2e regulator: arizona-ldo1: Support DVFS in default constraints
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>
2012-11-28 17:30:07 +00:00
Mark Brown 86a1450118 regulator: arizona-ldo1: Add enable time
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 17:30:05 +00:00
Axel Lin 7a4beda0c6 regulator: as3711: Fix the logic in as3711_sel_check
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>
2012-11-27 20:25:18 +00:00
Axel Lin 16ed9f0701 regulator: as3711: Fix valid min_uV/max_UV checking in as3711_bound_check
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>
2012-11-27 20:25:13 +00:00
Sangbeom Kim f7ebaaeb0b regulator: s2mps11: Fix ramp delay value shift operation
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
2012-11-27 20:24:15 +00:00
Axel Lin 1e369bcd03 regulator: da9052: Ensure setting current limit within specific range
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>
2012-11-27 20:22:53 +00:00
Axel Lin f509fd46c1 regulator: da9055: Select maximum current in specific range for 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>
2012-11-27 20:21:26 +00:00
Laxman Dewangan 10835600cf regulator: tps6586x: fix build warning in debug build
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>
2012-11-27 20:20:04 +00:00
Axel Lin 9997f3ffbb regulator: tps51632: Fix writing to wrong register when enable_pwm_dvfs is set
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>
2012-11-27 20:17:01 +00:00
Axel Lin 6b1f8a4566 regulator: da9055: Use linear_min_sel and regulator_[map|list]_voltage_linear
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27 20:11:19 +00:00
Mark Brown 5979b2a35f Merge branches 'topic/da9055' and 'topic/tps51632' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-min 2012-11-27 20:08:14 +00:00
Axel Lin 9119ff6af5 regulator: palmas: Use linear_min_sel and regulator_[map|list]_voltage_linear
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27 20:07:40 +00:00
Axel Lin 33234e791d regulator: core: Allow specific minimal selector for starting linear mapping
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>
2012-11-27 20:07:40 +00:00
Mark Brown b87d07b13c Merge branch 'topic/hotplug' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-max8997
Conflicts:
	drivers/regulator/max8997.c
2012-11-27 20:06:08 +00:00
Thomas Abraham 77b71b370e regulator: add device tree support for max8997
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>
2012-11-27 20:05:36 +00:00
Thomas Abraham 068a8c8239 regulator: max8997: limit the number of dvs registers programmed in non-dvs mode
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>
2012-11-24 18:57:04 +01:00
Thomas Abraham 11ec7bf001 regulator: max8997: reorder buck1/2/5 dvs setup code
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>
2012-11-24 18:56:32 +01:00
Axel Lin d95420b860 regulator: tps65090: Add MODULE_ALIAS
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>
2012-11-24 18:50:35 +01:00
Laxman Dewangan 56968658ff regulator: max8973: provide enable/disable if external control disabled
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>
2012-11-23 21:16:35 +09:00
Guennadi Liakhovetski f1e64f9026 regulator: add a regulator driver for the AS3711 PMIC
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>
2012-11-23 21:14:40 +09:00
Axel Lin bf0caae303 regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed 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>
2012-11-23 21:13:01 +09:00
Axel Lin 1a7ae58e2c regulator: tps80031: Trivial cleanups
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>
2012-11-23 21:12:57 +09:00
Axel Lin e05f70c268 regulator: max8973: Fix callback setting for max8973_dcdc_ops.enable
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-22 11:07:10 +09:00
Axel Lin 369cf602f3 regulator: da9055: Properly handle voltage range that doesn't start with 0 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>
2012-11-21 18:50:52 +09:00
Bill Pemberton 8dc995f56e regulator: remove use of __devexit
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>
2012-11-20 10:53:38 +09:00
Mark Brown 13ae633cf7 regulator: wm831x: Set the new rather than old value for DVS VSEL
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-11-20 10:42:13 +09:00
Mark Brown ce6dd5da9d Merge branch 'topic/tps6586x' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-hotplug
Conflicts:
	drivers/regulator/tps6586x-regulator.c
2012-11-20 10:39:55 +09:00
Bill Pemberton a5023574d1 regulator: remove use of __devinit
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>
2012-11-20 10:31:26 +09:00
Bill Pemberton 5eb9f2b963 regulator: remove use of __devexit_p
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>
2012-11-20 10:31:19 +09:00
Mark Brown f86221d2b9 Merge branches 'topic/tps51632', 'topic/tps80031', 'topic/vexpress', 'topic/max8925', 'topic/gpio' and 'topic/tps65090' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-hotplug 2012-11-20 10:30:22 +09:00
Laxman Dewangan 5928f53896 regulator: max8973: add regulator driver support
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>
2012-11-19 17:03:11 +09:00
Axel Lin 26cbd30733 regulator: da9055: Fix checking wrong value in da9055_gpio_init
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>
2012-11-16 09:46:57 +09:00
Laxman Dewangan b92f787d14 regulator: tps80031: add prefix TPS80031 on common defines.
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>
2012-11-15 14:35:50 +09:00
Ashish Jangam f6130be652 regulator: DA9055 regulator driver
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>
2012-11-15 14:29:49 +09:00
Laxman Dewangan 64e481603a mfd: tps6586x: move regulator dt parsing to regulator driver
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>
2012-11-15 14:23:17 +09:00
Mark Brown ecb48c337b Merge remote-tracking branches 'regulator/fix/gpio', 'regulator/fix/put' and 'regulator/fix/supp-volt' into tmp 2012-11-15 11:16:02 +09:00
Marek Szyprowski f0f98b19e2 regulator: fix voltage check in regulator_is_supported_voltage()
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
2012-11-15 11:14:18 +09:00
Lee Jones 216f2b9c95 regulator: gpio-regulator: Catch 'no states property' misuse
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>
2012-11-14 20:58:09 +09:00
Charles Keepax 23ff2f0f61 regulator: core: Avoid deadlock when regulator_register fails
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>
2012-11-14 19:01:15 +09:00
Frank Li f8a9f757cb regulator: gpio-regulator: fix can't find regulator node in dt
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, &regulator_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>
2012-11-13 16:35:57 +09:00
Laxman Dewangan 1a0bb679bc regulator: tps80031: add regulator driver for tps80031
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>
2012-11-13 15:57:39 +09:00
Qing Xu 45b6f8e8fc regulator: max8925: support dt for regulator
Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-07 15:12:12 +01:00
Axel Lin 7bde76726f regulator: tps51632: Fix trivial typo for TPS51632 Kconfig help text
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>
2012-11-01 14:23:04 +00:00
Andrew Lunn b2da55d944 Regulator: core: Unregister when gpio request fails.
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>
2012-10-28 18:13:07 +00:00
Yadwinder Singh Brar 38d34035e6 regulator: max77686: Make max77686_enable() static.
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>
2012-10-22 14:55:36 +01:00
Lee Jones 006694d099 regulator: gpio-regulator: Allow use of GPIO controlled regulators though DT
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>
2012-10-17 22:27:55 +09:00
Laxman Dewangan f329b1755b regulator: tps65090: add external control support for DCDC
The TPS65090's DCDC output can also be enable/disable through the
external digital input signal. Add support for enable/disable
either through register access via I2C or through external
control inputs. The external control inputs can be driven through
GPIOs also and hence adding support for passing the GPIO number.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-17 22:21:21 +09:00
Laxman Dewangan 3a81ef8c27 regulator: tps65090: Add support for LDO regulators
TPS65090 supports the two LDOs, LDO1 and LDO2. These are
always ON regulators. The output on these LDOs are available
once the input voltage available for these LDOs.
Add support for these LDOs regulators.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-17 22:21:20 +09:00
Laxman Dewangan 8620ca9f77 regulator: tps65090: rename driver name and regulator name
To make the names proper and more appropriate:
Rename the driver name from tps65090-regulator to tps65090-pmic.
Rename the regulators from TPS65090_ID_* to TPS65090_REGULATOR_*

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-17 22:21:20 +09:00
Laxman Dewangan 24282a1ca3 regulator: tps65090: Register all regulators in single probe call
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>
2012-10-17 22:21:14 +09:00
AnilKumar Ch a9a5659ac6 regulator: tps65910: fix BUG_ON() shown with vrtc regulator
Fix BUG_ON() error if tps65910 VRTC regulator is used with out
rdev->desc->volt_table data. Recent changes in regulator core driver
which add support for "regulator_list_voltage_table" have BUG_ON() if
regulator descriptor do not voltage table information. This patch adds
the voltage table information to fix the issue.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-17 22:17:39 +09:00
Yadwinder Singh Brar 15282ba9ea regulator: max77686: Add set_suspend_disable/set_suspend_mode callbacks.
This patch implements set_suspend_disable callback for BUCKs which
support only switch ON/OFF modes during system suspend state, and
set_suspend_mode callbacks for LDOs which also suport Low power mode and
switch ON/OFF modes.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-17 22:16:21 +09:00
Yadwinder Singh Brar 6d2c896b72 regulator: max77686: Use already set opmode while re-enabling regulators.
This patch adds basic support to take care of opmode(if any) which can be set by
set_suspend_[disable/mode] callbacks.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-17 22:16:21 +09:00
Axel Lin 9f4e45f77e regulator: vexpress: Add terminating entry for vexpress_regulator_of_match table
The of_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-17 16:34:08 +09:00
Pawel Moll 31e54086dd regulator: Versatile Express regulator driver
Implementation of the regulator framework driver for the
Versatile Express voltage control. Devices without
voltage constraints (ie. "regulator-[min|max]-microvolt"
properties in the DT node) are treated as fixed (or rather
read-only) regulators.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-15 11:56:08 +09:00
Pawel Moll bd7a2b600a regulator: core: Support for continuous voltage range
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>
2012-10-15 11:56:08 +09:00
Laxman Dewangan 0c57067430 regulator: tps51632: Add tps51632 regulator driver
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>
2012-10-15 11:54:42 +09:00
Mark Brown 4e92920b4b regulator: lp8788-ldo: Staticise non-exported symbol
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-15 10:06:44 +09:00
Linus Torvalds 578f1ef91a MFD bits for the 3.7 merge window.
As usual we have a few new drivers:
 
 - TI LP8788
 - TI OMAP USB TLL
 - Maxim MAX8907
 - SMSC ECE1099
 - Dialog Semiconductor DA9055
 - A simpler syscon driver that allow us to get rid of the anatop one.
 
 Drivers are also gradually getting Device Tree and IRQ domain support.
 
 The following drivers got DT support:
 - palmas, 88pm860x, tc3589x and twl4030-audio
 
 And those ones now use the IRQ domain APIs:
 - 88pm860x, tc3589x, db8500_prcmu
 
 Also some other interesting changes:
 - Intel's ICH LPC now supports Lynx Point
 - TI's twl4030-audio added a GPO child
 - tps6527 enabled its backlight subdevice
 - The twl6030 pwm driver moved to the new PWM subsystem
 
 And finally a bunch of cleanup and casual fixes for mc13xxx, 88pm860x, palmas,
 ab8500, wm8994, wm5110, max8907 and the tps65xxx family.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQbVq4AAoJEIqAPN1PVmxKXOsP/ifwoqYkaGUsZ7M8b8iTTxlk
 a0/SBU1O+FDG7LbIsOyJ6VZCpipj8R4WyVqNdS2CSPVoSdT8KnakrxFY9FAtcmpA
 c6O7r+9dymcT7HeQ6mBQYYeEyXcZQkTXj9Y298zuRT88gccH5PQIOX8DTj6gKVxN
 xhuDuAWtizvwAJWfof/57p7JLilCF96Hq0UdeISD10UWJPxPmXFJTzzYw6GbPPOl
 zk1N6yig3VpK6sfK+QdqZykHFKj23RX57SmceHOISTpEr66ayuKIkJEqWm/IydMO
 XWDTT2IN80ca+1PnbrQOyiMtXg3EKrZN5WDEp2AcUiKP0fnAoZBTeuZUkqyLc3rJ
 W8LowQe6x5154CeLwcJc4+kmeGUhbj09GHKCsI7x/lQpMWgJCaGHGvLxAUE1uRZi
 4Bn9IUP7OqE465fNolLOd1fRxgzWJxe5rBYKQB7UcOrS0NThPhu0r0qV905zBrBO
 tyCZz+PexTiirpbv1K0dMTcpWeHVOmtYG5uJTmw9wTRv7jW7aUhkhkW5Q+E5BAdb
 9Rj5/vYertqI3VzRQ1w2z1SavzBO3OykTURWGDkwjfFWYbJtEdPYGGjRSFiphVYG
 8jvs5UzrDm2ICqkpkKzovVWi9lXyvNVVCgSwxHQeoPXfqb5dXLlbUZZBaCaQpRII
 XlItAJvIiUNIA8bXLoC8
 =n6lp
 -----END PGP SIGNATURE-----

Merge tag 'mfd-3.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull MFD changes from Samuel Ortiz:
 "MFD bits for the 3.7 merge window.

  As usual we have a few new drivers:

   - TI LP8788
   - TI OMAP USB TLL
   - Maxim MAX8907
   - SMSC ECE1099
   - Dialog Semiconductor DA9055
   - A simpler syscon driver that allow us to get rid of the anatop one.

  Drivers are also gradually getting Device Tree and IRQ domain support.

  The following drivers got DT support:
   - palmas, 88pm860x, tc3589x and twl4030-audio

  And those ones now use the IRQ domain APIs:
   - 88pm860x, tc3589x, db8500_prcmu

  Also some other interesting changes:
   - Intel's ICH LPC now supports Lynx Point
   - TI's twl4030-audio added a GPO child
   - tps6527 enabled its backlight subdevice
   - The twl6030 pwm driver moved to the new PWM subsystem

  And finally a bunch of cleanup and casual fixes for mc13xxx, 88pm860x,
  palmas, ab8500, wm8994, wm5110, max8907 and the tps65xxx family."

Fix up various annoying conflicts: the DT and IRQ domain support came in
twice and was already in 3.6. And then it was apparently rebased.

Guys, DON'T REBASE!

* tag 'mfd-3.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (89 commits)
  ARM: dts: Enable 88pm860x pmic
  mfd: 88pm860x: Move gpadc init into touch
  mfd: 88pm860x: Device tree support
  mfd: 88pm860x: Use irqdomain
  mfd: smsc: Add support for smsc gpio io/keypad driver
  backlight: tps65217_bl: Add missing platform_set_drvdata in tps65217_bl_probe
  mfd: DA9055 core driver
  mfd: tps65910: Add alarm interrupt of TPS65910 RTC to mfd device list
  mfd: wm5110: Add register patches for revision B
  mfd: wm5110: Disable control interface error report for WM5110 rev B
  mfd: max8907: Remove regulator-compatible from DT docs
  backlight: Add TPS65217 WLED driver
  mfd: Add backlight as subdevice to the tps65217
  mfd: Provide the PRCMU with its own IRQ domain
  mfd: Fix max8907 sparse warning
  mfd: Add lp8788 mfd driver
  mfd: dbx500: Provide a more accurate smp_twd clock
  mfd: rc5t583: Fix warning messages
  regulator: palmas: Add DT support
  mfd: palmas: Change regulator defns to better suite DT
  ...
2012-10-05 12:01:30 +09:00
Linus Torvalds 033d9959ed Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue changes from Tejun Heo:
 "This is workqueue updates for v3.7-rc1.  A lot of activities this
  round including considerable API and behavior cleanups.

   * delayed_work combines a timer and a work item.  The handling of the
     timer part has always been a bit clunky leading to confusing
     cancelation API with weird corner-case behaviors.  delayed_work is
     updated to use new IRQ safe timer and cancelation now works as
     expected.

   * Another deficiency of delayed_work was lack of the counterpart of
     mod_timer() which led to cancel+queue combinations or open-coded
     timer+work usages.  mod_delayed_work[_on]() are added.

     These two delayed_work changes make delayed_work provide interface
     and behave like timer which is executed with process context.

   * A work item could be executed concurrently on multiple CPUs, which
     is rather unintuitive and made flush_work() behavior confusing and
     half-broken under certain circumstances.  This problem doesn't
     exist for non-reentrant workqueues.  While non-reentrancy check
     isn't free, the overhead is incurred only when a work item bounces
     across different CPUs and even in simulated pathological scenario
     the overhead isn't too high.

     All workqueues are made non-reentrant.  This removes the
     distinction between flush_[delayed_]work() and
     flush_[delayed_]_work_sync().  The former is now as strong as the
     latter and the specified work item is guaranteed to have finished
     execution of any previous queueing on return.

   * In addition to the various bug fixes, Lai redid and simplified CPU
     hotplug handling significantly.

   * Joonsoo introduced system_highpri_wq and used it during CPU
     hotplug.

  There are two merge commits - one to pull in IRQ safe timer from
  tip/timers/core and the other to pull in CPU hotplug fixes from
  wq/for-3.6-fixes as Lai's hotplug restructuring depended on them."

Fixed a number of trivial conflicts, but the more interesting conflicts
were silent ones where the deprecated interfaces had been used by new
code in the merge window, and thus didn't cause any real data conflicts.

Tejun pointed out a few of them, I fixed a couple more.

* 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (46 commits)
  workqueue: remove spurious WARN_ON_ONCE(in_irq()) from try_to_grab_pending()
  workqueue: use cwq_set_max_active() helper for workqueue_set_max_active()
  workqueue: introduce cwq_set_max_active() helper for thaw_workqueues()
  workqueue: remove @delayed from cwq_dec_nr_in_flight()
  workqueue: fix possible stall on try_to_grab_pending() of a delayed work item
  workqueue: use hotcpu_notifier() for workqueue_cpu_down_callback()
  workqueue: use __cpuinit instead of __devinit for cpu callbacks
  workqueue: rename manager_mutex to assoc_mutex
  workqueue: WORKER_REBIND is no longer necessary for idle rebinding
  workqueue: WORKER_REBIND is no longer necessary for busy rebinding
  workqueue: reimplement idle worker rebinding
  workqueue: deprecate __cancel_delayed_work()
  workqueue: reimplement cancel_delayed_work() using try_to_grab_pending()
  workqueue: use mod_delayed_work() instead of __cancel + queue
  workqueue: use irqsafe timer for delayed_work
  workqueue: clean up delayed_work initializers and add missing one
  workqueue: make deferrable delayed_work initializer names consistent
  workqueue: cosmetic whitespace updates for macro definitions
  workqueue: deprecate system_nrt[_freezable]_wq
  workqueue: deprecate flush[_delayed]_work_sync()
  ...
2012-10-02 09:54:49 -07:00
Haojian Zhuang 2e57d56747 mfd: 88pm860x: Device tree support
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-10-02 11:43:13 +02:00
Mark Brown 6a2027abd2 Merge remote-tracking branches 'regulator/topic/core', 'regulator/topic/bypass', 'regulator/topic/tol', 'regulator/topic/drivers' and 'regulator/topic/tps6586x' into regulator-next 2012-09-28 14:45:07 +01:00
Mark Brown e96961dabe regulator: arizona-ldo: Remove top voltage
The highest voltage step is not supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-28 14:44:11 +01:00
Stephen Warren 13511def87 regulator: deprecate regulator-compatible DT property
When the bindings for the TPS6586x regulator were being proposed, I
asserted that DT node naming rules for bus child nodes should also be
applied to nodes inside the TPS6586x regulator node itself. In other
words, that each node providing regulator init data should be named
after the type of object it represented ("regulator") and hence that
some other property was required to indicate which regulator the node
described ("regulator-compatible"). In turn this led to multiple nodes
having the same name, thus requiring node names to use a unit address
to make them unique, thus requiring reg properties within the nodes and

However, subsequent discussion indicates that the rules I was asserting
only applies to standardized bus nodes, and within a device's own node,
the binding can basically do anything sane that it wants.

Hence, this change deprecates the register-compatible property, and
instead uses node names to replace this functionality. This greatly
simplifies the device tree content, making them smaller and more legible.

The code is changed such that old device trees continue to work.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-25 13:44:47 +01:00
Graeme Gregory a361cd9f2e regulator: palmas: Add DT support
Add DT support to palmas regulator. This involved a little change to
the platform data structure. Regulator information can now come from
platform data or DT.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-23 20:51:33 +02:00
Haojian Zhuang ff13e9e256 mfd: 88pm860x: Avoid to check resource for preg regulator
Since PREG regulator is the only one regulator in 88PM8606, and other
regulators are in 88PM8607. Checking resource as identifying regulator
is not a good way. We can use NULL resource to indentify PREG regulator.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19 12:39:13 +02:00
Jett.Zhou e7a7810ae0 regulator: 88pm860x: Add pre-regulator support for 88pm860x regulator
Pre-regulator of 88pm8606 is mainly for support charging based on vbus,
it needs to be enabled for charging battery, and will be disabled in
some exception condition like over-temp.
Add the pre-regulator support for 88pm860x regulator driver.

Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19 12:39:13 +02:00
Haojian Zhuang 51acdb6118 mfd: max8925: Remove array in regulator platform data
Remove array in parent's platform data. Use struct regulator_init_data
as regulator device's platform data directly. So a lot of pdata are
added into parent's platform data. And voltage out register offset
is used as IORESOURCE_REG to distinguish different regualtor devices.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19 12:39:13 +02:00
Dong Aisheng baa64151ae regulator: anatop-regulator: Convert to use syscon to access anatop register
Using syscon to access anatop register.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-17 15:27:31 +02:00
Linus Torvalds 73f8be297e This is the remaining MFD fixes for 3.6, with 5 pending fixes:
- A tps65217 build error fix.
 - A lcp_ich regression fix caused by the MFD driver failing to initialize the
   watchdog sub device due to ACPI conflicts.
 - 2 MAX77693 interrupt handling bug fixes.
 - An MFD core fix, adding an IRQ domain argument to the MFD device addition
   API in order to prevent silent and potentially harmful remapping behaviour
   changes for drivers supporting non-DT platforms.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQVQpwAAoJEIqAPN1PVmxKpnQP/iDPakfGT0m00nxk9VvuXfaA
 SlNxhhM1ZPxlZcBrVFULZ+dCVuUaBYIfwoT4Wwl2yZsmp8uYb62Rd6LGXDnjO+FH
 zKMg3b/KDHq/jicYxqFy4bVq3I850jTLN4Hti6hArn8HM6gxZJQxM810Poxt6M0T
 odud6oHSevGpCoL7GU4O+gmx1wKSDRrw6TZPokJDfXaQcFPJEt0YGGtI2zAO1sV+
 iBPQE/bI3bF5r/kowbh9ro5WybGNyFrwiYtaTzJWntXoPKN1lmr0F2F2NaCEo1xj
 2vJPFSCK3qC9Ft7sPQEBYxrSXzyzgu7G8HGgkcBG5SaSo+W3awe9DEaHfk5E7sdr
 iyc01kh4FmGlMAvHG/zcK3YvchR7GJdRI7BrR+MTQ03ZUv/ZrmTYFAHv5fAzBQ+N
 6ZUoC/1bqPKpfeFPOKYpDeYJVnFBWLYr+t7McTqqg+kpxUuYnQ0HyJVjDh01ZVQT
 AtCjjW7R+Ka44B+xfMOartPZMqZZEHSJ0UjacyEyzMpAAY14eUDMtTqs/jtNp+8Z
 B0bZiA8ZhUmNVH7TZoT/u57FgEW34JnM8oH6jLVN+yjInpuugIvqpZn0TA90GL7V
 Fh2DALMgUN5z/TXduGSsSPg1hvXFPOujaS+4o78e8PWiVQd5XUk/mc8OOS/mrRwj
 +mILnzxJcp8iYrYqESbt
 =nP/y
 -----END PGP SIGNATURE-----

Merge tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull mfd fixes from Samuel Ortiz:
 "This is the remaining MFD fixes for 3.6, with 5 pending fixes:

   - A tps65217 build error fix.
   - A lcp_ich regression fix caused by the MFD driver failing to
     initialize the watchdog sub device due to ACPI conflicts.
   - 2 MAX77693 interrupt handling bug fixes.
   - An MFD core fix, adding an IRQ domain argument to the MFD device
     addition API in order to prevent silent and potentially harmful
     remapping behaviour changes for drivers supporting non-DT
     platforms."

* tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: MAX77693: Fix NULL pointer error when initializing irqs
  mfd: MAX77693: Fix interrupt handling bug
  mfd: core: Push irqdomain mapping out into devices
  mfd: lpc_ich: Fix a 3.5 kernel regression for iTCO_wdt driver
  mfd: Move tps65217 regulator plat data handling to regulator
2012-09-16 13:22:21 -07:00
Marcus Cooper 0fd0013cda mfd: ab3100: Split ab3100 headers out of abx500.h
The U8500 has its own set of separate header, so the abx500
becomes completely abstract. Do the same split for the AB3100
legacy ASIC.

Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-14 09:52:15 +02:00
Haojian Zhuang a70abacb06 mfd: 88pm860x: Use REG resource in regulator
Since IORESOURCE_IO is changed to IORESOURCE_REG in 88pm860x driver,
update self-defined IORESOURCE_IO resource to register offset that
is IORESOURCE_REG in regulator driver. And split regulator platform
data array into scattered platform data.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-11 11:38:17 +02:00
Mark Brown 023670295a mfd: 88pm860x: Convert to IORESOURCE_REG
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-11 10:15:03 +02:00
Mark Brown 5656098e19 mfd: wm831x: Convert to IORESOURCE_REG
This was originally written by Russell King who unfortunately found
himself unable to take the patch futher.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-11 10:15:03 +02:00
Yunfan Zhang 3b26e48308 regulator: fan53555: remove vsel_max not used
The max voltage will be bounded by min_uV, uV_step and n_voltages, so
remove it to avoid confusing.

Signed-off-by: Yunfan Zhang <yfzhang@marvell.com>
Reviewed-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 15:58:01 +08:00
Mark Brown e4c5288e41 regulator: aat2870: Don't explicitly initialise the first field
Doing so generates a warning as the first field is a pointer but we use
0 to initalize it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 15:34:36 +08:00
Mark Brown 22c5fb6a7d regulator: wm831x-ldo: Add bypass support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 11:25:13 +08:00
Mark Brown e477ce075d regulator: arizona-micsupp: Support get/set bypass
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 11:25:12 +08:00
Mark Brown 9a17de04ef regulator: arizona-ldo: Support get/set bypass
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 11:25:11 +08:00
Mark Brown df36793115 regulator: core: Provide regmap get/set bypass operations
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 11:25:10 +08:00
Mark Brown f59c8f9fe6 regulator: core: Support bypass mode
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>
2012-09-10 11:25:10 +08:00
Yunfan Zhang 49d8c59927 regulator: Fairchild fan53555 support
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>
2012-09-10 09:55:22 +08:00
Mark Brown 029dd3cefa regulator: twl: Remove another unused variable warning
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-09 11:09:38 +08:00