Commit Graph

1933 Commits

Author SHA1 Message Date
Axel Lin a1b6fa85c6 regulator: pfuze100: Fix address of FABID
According to the datasheet, the address of FABID is 0x4. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-12-09 17:18:19 +00:00
Mark Brown 9eb9d3150b regulator: gpio: Warn if an invalid regulator-type is supplied
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-06 12:15:33 +00:00
Mark Brown 5b1ada83ba regulator: gpio: Don't require a regulator-type property
Since essentially all GPIO controlled regulators are voltage regulators
make the regulator-type property optional, defaulting to voltage.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-05 11:34:53 +00:00
Linus Walleij 34c040ce1a regulator: ab8500: delete non-devicetree probe path
The Ux500 platform has been converted to do device-tree only
boots, no longer supports platform data passing, so this
probe path is unused. Delete it, simplifying the driver a
whole lot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-03 15:09:06 +00:00
Vince Hsu 6389075eff regulator: as3722: set the correct current limit
Simple fix to set the correct current limit for SD0/1/6.

Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Fixes: bc407334e9 (regulator: as3722: add regulator driver for AMS AS3722)
Cc: stable@vger.kernel.org
2013-12-02 18:02:34 +00:00
Axel Lin 561427f5ea mfd: pcf50633: Correct device name for pcf50633 regulator
Change the device name of the regulator function to the one chosen for
MODULE_ALIAS. This fixes kernel auto-module loading for the regulator function.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-02 17:58:58 +00:00
Mark Brown 75bc9641ca regulator: core: Check for DT every time we check full constraints
Eliminate the gap between DT becoming available and this being used to say
we have full constraints by checking directly for DT every time we check
for full constraints. This improves interoperaton with optional regulator
support.

Signed-off-by: Mark Brown <broonie@linaro.org>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-27 17:13:29 +00:00
Mark Brown 87b2841753 regulator: core: Replace checks of have_full_constraints with a function
Simple code reorganisation so we can change the logic for deciding what
full constraints are more easily.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-27 16:39:16 +00:00
Mark Brown 90ba0813db Merge remote-tracking branch 'regulator/fix/pfuze100' into regulator-linus 2013-11-24 14:02:50 +00:00
Mark Brown 3981560c2a Merge remote-tracking branch 'regulator/fix/gpio' into regulator-linus 2013-11-24 14:02:48 +00:00
Mark Brown 7e9e801f74 Merge remote-tracking branch 'regulator/fix/fixed' into regulator-linus 2013-11-24 14:02:47 +00:00
Mark Brown c3fda066de Merge remote-tracking branch 'regulator/fix/arizona' into regulator-linus 2013-11-24 14:02:47 +00:00
Axel Lin 93227c8013 regulator: lp3972: Convert to devm_regulator_register
Both num_regulators and **rdev are no longer required after this conversion,
thus remove them from struct lp3972.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24 14:02:18 +00:00
Charles Keepax 71979aa3c4 regulator: arizona-micsupp: Convert to use linear ranges
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24 14:01:22 +00:00
Mikko Perttunen 6930db1e98 regulator: tps51632: Get regulator name from i2c_client
Commit "i2c: core: make it possible to match a pure device tree driver"
changed semantics of the i2c probing for device tree devices.
Device tree probed devices now get a NULL i2c_device_id pointer.
This causes the regulator name to be set to NULL and the regulator
registration to fail.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24 13:57:15 +00:00
Linus Torvalds 9073e1a804 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree updates from Jiri Kosina:
 "Usual earth-shaking, news-breaking, rocket science pile from
  trivial.git"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
  doc: usb: Fix typo in Documentation/usb/gadget_configs.txt
  doc: add missing files to timers/00-INDEX
  timekeeping: Fix some trivial typos in comments
  mm: Fix some trivial typos in comments
  irq: Fix some trivial typos in comments
  NUMA: fix typos in Kconfig help text
  mm: update 00-INDEX
  doc: Documentation/DMA-attributes.txt fix typo
  DRM: comment: `halve' -> `half'
  Docs: Kconfig: `devlopers' -> `developers'
  doc: typo on word accounting in kprobes.c in mutliple architectures
  treewide: fix "usefull" typo
  treewide: fix "distingush" typo
  mm/Kconfig: Grammar s/an/a/
  kexec: Typo s/the/then/
  Documentation/kvm: Update cpuid documentation for steal time and pv eoi
  treewide: Fix common typo in "identify"
  __page_to_pfn: Fix typo in comment
  Correct some typos for word frequency
  clk: fixed-factor: Fix a trivial typo
  ...
2013-11-15 16:47:22 -08:00
Charles Keepax d2e7491e24 regulator: arizona-micsupp: Correct wm5110 voltage selection
wm5110 provides different voltage configurations than the other Arizona
parts, this patch adds support for this into the regulator driver. Also
fixup the default for the configuration register for wm5110.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org (v3.12)
2013-11-15 14:26:54 +00:00
Tim Harvey 88baf7148e regulator: pfuze100: allow misprogrammed ID
prior to week 08 of 2013 Freescale misprogrammed between 1 and 3% of
PFUZE1000 parts with a ID=0x8 instead of the expected ID=0x0

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-11-14 12:32:27 +00:00
Guennadi Liakhovetski f446043f1a regulator: fixed: fix regulator_list_voltage() for regression
Commit c368e5fc2a "regulator: fixed:
get rid of {get|list}_voltage()" broke regulator_list_voltage() for
the fixed regulator, because an earlier commit
5a523605af "regulator: core: provide
fixed voltage in desc for single voltage rail" missed to add support
for the fixed-voltage special case to that function. This patch
fixes that regression.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-13 14:00:51 +00:00
Axel Lin 56dde80a1a regulator: lp3971: Convert to devm_regulator_register
Both num_regulators and **rdev are no longer required after this conversion,
thus remove them from struct lp3971.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-13 13:24:44 +00:00
Laurent Pinchart 251b9c21d2 regulator: gpio-regulator: Don't oops on missing regulator-type property
Catch missing regulator-type property in DT and return an error
gracefully instead of deferencing a NULL pointer and crashing.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-09 15:06:22 +00:00
Mark Brown d4d5cef649 Merge remote-tracking branch 'regulator/topic/tps65910' into regulator-next 2013-10-24 11:11:43 +01:00
Mark Brown 2532a39500 Merge remote-tracking branch 'regulator/topic/tps6586x' into regulator-next 2013-10-24 11:11:43 +01:00
Mark Brown e11678e4b4 Merge remote-tracking branch 'regulator/topic/tps65090' into regulator-next 2013-10-24 11:11:42 +01:00
Mark Brown f5549f5bd8 Merge remote-tracking branch 'regulator/topic/tps65023' into regulator-next 2013-10-24 11:11:42 +01:00
Mark Brown 6c7bdf8e63 Merge remote-tracking branch 'regulator/topic/tps6105x' into regulator-next 2013-10-24 11:11:41 +01:00
Mark Brown 07afa93e31 Merge remote-tracking branch 'regulator/topic/ti-abb' into regulator-next 2013-10-24 11:11:41 +01:00
Mark Brown aa11a358f8 Merge remote-tracking branch 'regulator/topic/stw481x' into regulator-next 2013-10-24 11:11:40 +01:00
Mark Brown 67471b6a24 Merge remote-tracking branch 'regulator/topic/s5m8767' into regulator-next 2013-10-24 11:11:40 +01:00
Mark Brown 22eb85adaf Merge remote-tracking branch 'regulator/topic/palmas' into regulator-next 2013-10-24 11:11:39 +01:00
Mark Brown aef393da75 Merge remote-tracking branch 'regulator/topic/optional' into regulator-next 2013-10-24 11:11:39 +01:00
Mark Brown 88c260a180 Merge remote-tracking branch 'regulator/topic/mc13783' into regulator-next 2013-10-24 11:11:38 +01:00
Mark Brown 08f09c63e1 Merge remote-tracking branch 'regulator/topic/max8997' into regulator-next 2013-10-24 11:11:38 +01:00
Mark Brown 4e31566d9b Merge remote-tracking branch 'regulator/topic/lp3971' into regulator-next 2013-10-24 11:11:38 +01:00
Mark Brown 4c35c8676f Merge remote-tracking branch 'regulator/topic/linear' into regulator-next 2013-10-24 11:11:37 +01:00
Mark Brown a6117615a2 Merge remote-tracking branch 'regulator/topic/gpio' into regulator-next 2013-10-24 11:11:36 +01:00
Mark Brown 706664c290 Merge remote-tracking branch 'regulator/topic/fixed' into regulator-next 2013-10-24 11:11:36 +01:00
Mark Brown b735e47f6e Merge remote-tracking branch 'regulator/topic/devm' into regulator-next 2013-10-24 11:11:35 +01:00
Mark Brown 3242a86170 Merge remote-tracking branch 'regulator/topic/da9210' into regulator-next 2013-10-24 11:11:34 +01:00
Mark Brown 513b485a2d Merge remote-tracking branch 'regulator/topic/da9063' into regulator-next 2013-10-24 11:11:34 +01:00
Mark Brown 2a86e8e753 Merge remote-tracking branch 'regulator/topic/da9052' into regulator-next 2013-10-24 11:11:33 +01:00
Mark Brown 81e439f476 Merge remote-tracking branch 'regulator/topic/core' into regulator-next 2013-10-24 11:11:33 +01:00
Mark Brown cea64d8c08 Merge remote-tracking branch 'regulator/topic/as3722' into regulator-next 2013-10-24 11:11:33 +01:00
Mark Brown f2399df731 Merge remote-tracking branch 'regulator/topic/anatop' into regulator-next 2013-10-24 11:11:32 +01:00
Mark Brown 420118d483 Merge remote-tracking branch 'regulator/topic/alias' into regulator-next 2013-10-24 11:11:32 +01:00
Chanwoo Choi 04f9f068a6 regulator: s5m8767: Modify parsing method of the voltage table of buck2/3/4
The s5m8767 regulator driver parse always the voltage table of buck2/3/4.
If gpio_dvs feature isn't used and dts haven't included the voltage table
of buck2/3/4, s5m8767 regulator driver return error and file probe state.

This patch check only voltage table of buck on s5m8767_pmic_dt_parse_pdata()
if buck[2-4]_gpiodvs is true.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-24 11:11:14 +01:00
Chanwoo Choi 033054e860 regulator: s5m8767: Modify parse_dt function to parse data related to ramp
This patch parse 'buck[2-4]_ramp_enable and buck_ramp_delay' platform data
from dts file.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-24 11:11:14 +01:00
Axel Lin d706b1e493 regulator: da9052: Revert se apply_[reg|bit] with regmap based voltage_sel operations
This reverts commit 68f7506017.

Michael reported that with this patch we loose the fix_io code path from
da9052_reg_update. Thus revert it.

Reported-by: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-24 10:10:35 +01:00
Charles Keepax a06ccd9c37 regulator: core: Add ability to create a lookup alias for supply
These patches add the ability to create an alternative device on which
a lookup for a certain supply should be conducted.

A common use-case for this would be devices that are logically
represented as a collection of drivers within Linux but are are
presented as a single device from device tree. It this case it is
necessary for each sub device to locate their supply data on the main
device.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18 00:56:05 +01:00
Jingoo Han 4b57927045 regulator: tps65910: Fix checkpatch issue
Fix the following checkpatch errors and warning.

  ERROR: spaces required around that '=' (ctx:VxV)
  ERROR: space required before the open parenthesis '('
  WARNING: line over 80 characters

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:37:56 +01:00
Jingoo Han 5ee034e614 regulator: tps65023: Fix checkpatch issue
Fix the following checkpatch warning.

  WARNING: line over 80 characters

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:36:05 +01:00
Jingoo Han 4932e89d75 regulator: tps6105x: Fix checkpatch issue
Fix the following checkpatch warning.

  WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:26:57 +01:00
Jingoo Han c6a21f2462 regulator: mc13892: Fix checkpatch issue
Fix the following checkpatch warnings.

  WARNING: Avoid unnecessary line continuations
  WARNING: line over 80 characters

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:26:04 +01:00
Jingoo Han 6e044c3fa8 regulator: mc13783: Fix checkpatch issue
Fix the following checkpatch warnings.

  WARNING: Avoid unnecessary line continuations

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:24:59 +01:00
Jingoo Han c4e3b1442a regulator: max8997: Fix checkpatch issue
Fix the following checkpatch warning.

  WARNING: quoted string split across lines

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:23:55 +01:00
Jingoo Han 0a3ee93a32 regulator: lp3971: Fix checkpatch issue
Fix the following checkpatch warnings.

  WARNING: please, no spaces at the start of a line

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:23:01 +01:00
Jingoo Han 609d5f6ddc regulator: fixed: Fix checkpatch issue
Fix the following checkpatch warnings.

  WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:21:44 +01:00
Jingoo Han 34f7568510 regulator: anatop: Fix checkpatch issue
Fix the following checkpatch warning.

  WARNING: quoted string split across lines

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:18:49 +01:00
Masanari Iida 6d3be300c6 treewide: Fix typo in printk
Correct spelling typo within various part of the kernel

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-14 15:24:22 +02:00
Axel Lin 8828bae464 regulator: Add REGULATOR_LINEAR_RANGE macro
Add REGULATOR_LINEAR_RANGE macro and convert regulator drivers to use it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 12:49:16 +01:00
Axel Lin e277e65680 regulator: Remove max_uV from struct regulator_linear_range
linear ranges means each range has linear voltage settings.
So we can calculate max_uV for each linear range in regulator core rather than
set the max_uV field in drivers.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 12:49:12 +01:00
Mark Brown 813de3c649 Merge remote-tracking branch 'regulator/topic/as3722' into regulator-linear 2013-10-11 12:48:57 +01:00
Nishanth Menon 9a633a2bce regulator: ti-abb: Fix operator precedence typo
commit 40b1936e (regulator: Introduce TI Adaptive Body Bias(ABB) on-chip
LDO driver) missed a pair of brackets which cause the wrong vset data to be
picked up from efuse, resulting in bad VBB voltage values.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-10-11 12:28:49 +01:00
Laxman Dewangan 4ae1ff7fe8 regulator: tps65910: get regulators node from parent node only
As per the devicetree binding document of TPS65910, the "regulators"
subnode should be under the parent node, not outside of parent node.
Hence to get the regulator node, the correct call is
of_get_child_by_name() rather than of_find_node_by_name() which searches
the "regulators" node from the parent node to end of DTS file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-09 18:51:37 +01:00
Laxman Dewangan 712c967fec regulator: tps6586x: get regulators node from parent node only
As per the devicetree binding document of TPS6586x, the "regulators"
subnode should be under the parent node, not outside of parent node.
Hence to get the regulator node, the correct call is
of_get_child_by_name() rather than of_find_node_by_name() which searches
the "regulators" node from the parent node to end of DTS file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-09 18:51:07 +01:00
Laxman Dewangan 4c850ead98 regulator: tps65090: get regulators node from parent node only
As per the devicetree binding document of TPS65090, the "regulators"
subnode should be under the parent node, not outside of parent node.
Hence to get the regulator node, the correct call is
of_get_child_by_name() rather than of_find_node_by_name() which searches
the "regulators" node from the parent node to end of DTS file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-09 18:50:37 +01:00
Laxman Dewangan acc1ccadb8 regulator: palmas: get regulators node from parent node only
The device tree binding of Palmas regulator driver says as:

palmas_pmis {
	compatible = "ti,palmas-pmic";
	...
	regulators {
		...
	}
};

In this "regulators" subnode is expected to be part of parent node, not
the outside of parent node. Hence to get the regulator node, the correct
call is of_get_child_by_name() rather than of_find_node_by_name() which
actually searches the "regulators" node from the parent node to end of DTS
file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 12:13:37 +01:00
Sachin Kamat 6653efb75d regulator: gpio: Remove redundant break
'break' after goto has no effect. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-04 11:50:10 +01:00
Mark Brown 4040394e12 regulator: core: Always warn when using a dummy regulator
This helps people spot if they have missed a supply from a device tree or
equivalent data structure.

Suggested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-04 11:47:15 +01:00
Axel Lin 5e96570480 regulator: as3722: Fix off-by-one n_voltages setting for SDx
AS3722_SDx_VSEL_MAX means the maximum selecter, the n_voltages should be
AS3722_SDx_VSEL_MAX + 1.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 16:49:34 +01:00
Axel Lin 43f6fc9542 regulator: as3722: Fix equation to calculate max_uV in regulator_lin_range macro
Fix off-by-one in the equation to calculate max_uV and also adjust the _min_uV
setting accordingly.

For LDOs:
The voltage select bits set the LDO output voltage 0.825V...3.3V, 25mV steps
  ....00h : LDO off
  01h-24h : V_LDO4 = 0.8V + ldo4_vsel * 25mV
                   = 0.825V + (ldo4_vsel - 1h) * 25mV
  25h-3Fh : do not use
  40h-7Fh : V_LDO4 = 1.725V + (ldo4_vsel - 40h) * 25mV

For SD2345:
The voltage select bits set the DC/DC output voltage level and power the DC/DC
converter down.
  ....00h : DC/DC powered down
  01h-40h : V_SD2 = 0.6V + sd2_vsel * 12.5mV
                  = 0.6125V + (sd2_vsel - 1h) * 12.5mV
  41h-70h : V_SD2 = 1.4V + (sd2_vsel - 40h) * 25mV
                  = 1.425V + (sd2_vsel - 41h) * 25mV
  71h-7Fh : V_SD2 = 2.6V + (sd2_vsel - 70h) * 50mV
                  = 2.65V + (sd2_vsel - 71h) * 50mV

Note, the third entry in as3722_sd2345_ranges is wrong in current code.
Fix it based on the datasheet.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 16:49:21 +01:00
Axel Lin 18dca93eb7 regulator: stw481x-vmmc: Set missing .of_match_table to stw481x_vmmc_match
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:43:04 +01:00
Jingoo Han 5e0855759c regulator: tps6524x: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:11:30 +01:00
Jingoo Han 11c0da7bb4 regulator: da9210: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:11:30 +01:00
Mark Brown 21a122b5f4 Merge remote-tracking branch 'regulator/topic/tps6524x' into regulator-devm 2013-09-30 18:11:26 +01:00
Mark Brown f004eaf4d1 Merge remote-tracking branch 'regulator/topic/da9210' into regulator-devm 2013-09-30 18:11:18 +01:00
Jingoo Han abf92a3d2e regulator: vexpress: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:11:03 +01:00
Jingoo Han 00ce070e51 regulator: twl: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:11:03 +01:00
Jingoo Han 6a2b5a931f regulator: tps6105x: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:11:00 +01:00
Jingoo Han 5e0165e5a9 regulator: pcf50633: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:11:00 +01:00
Jingoo Han 15dc006af8 regulator: pcap: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:11:00 +01:00
Jingoo Han 58765e24be regulator: max8925: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:10:59 +01:00
Jingoo Han 0b7bb09054 regulator: lp8788-ldo: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:10:59 +01:00
Jingoo Han 3343fa1748 regulator: lp8788-buck: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:10:59 +01:00
Jingoo Han ed602534df regulator: lp872x: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:10:59 +01:00
Jingoo Han e97bba912e regulator: da9063: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:10:52 +01:00
Jingoo Han a4a6b9de5c regulator: ab8500-ext: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:10:52 +01:00
Jingoo Han fda5842cc6 regulator: ab3100: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:10:52 +01:00
Mark Brown f3d17a7e4d Merge remote-tracking branch 'regulator/fix/wm8350' into regulator-linus 2013-09-30 12:04:33 +01:00
Mark Brown 60c32f3ec8 Merge remote-tracking branch 'regulator/fix/wm831x' into regulator-linus 2013-09-30 12:04:33 +01:00
Mark Brown 0f5da28f93 Merge remote-tracking branch 'regulator/fix/ti-abb' into regulator-linus 2013-09-30 12:04:32 +01:00
Mark Brown 780a0ff76e Merge remote-tracking branch 'regulator/fix/palmas' into regulator-linus 2013-09-30 12:04:31 +01:00
Mark Brown e7b87825e8 Merge remote-tracking branch 'regulator/fix/da9063' into regulator-linus 2013-09-30 12:04:29 +01:00
Thierry Reding 5df529d440 regulator: core: Reduce busy-wait looping
Keep busy-wait looping to a minimum while waiting for a regulator to
ramp-up to the target voltage. This follows the guidelines set forth
in Documentation/timers/timers-howto.txt and assumes that regulators
are never enabled in atomic context.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 11:43:12 +01:00
Nishanth Menon bde251a9a8 regulator: ti-abb: skip optional parameter for ldo-address
On platforms like OMAP4460, LDO override is never used. Even though
efuse determines the ABB bias mode to operate at, ABB voltage is
preconfigured in internal efuse registers without the need for
LDO override for bias voltage. So skip optional parameter if
property is not present.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 15:02:29 +01:00
Nishanth Menon bf00ca35ce regulator: ti-abb: Fix bias voltage glitch in transition to bypass mode
As documented in Application Note SWPA117 v2.1(NDA), LDO override has a
requirement that when switching from Bias active + override active
mode(FBB/RBB) to Bypass(nominal) mode, LDO reset must be performed
*after* LDO transitions to Bypass(nominal) mode.

The same rule in reverse applies when switching from a ABB bypass mode
to ABB enabled - LDO override *must* be performed prior to transition to
required ABB mode, if we do not do that, the same glitch takes place.

Currently while transitioning to ABB bypass, we reset the LDO overide
prior to the transition which causes a few milliseconds where ABB LDO
voltage could go all the way to 800mV(based on SoC process node),
during this period, the delta voltage between VDD rail and VBB rail
could cause the system to improperly function.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-09-27 15:02:04 +01:00
Guennadi Liakhovetski 937433c250 regulator: da9210: add Device Tree support
This patch adds basic Device Tree support to the da9210 regulator driver -
with no special properties, since also driver's platform data only contains
standard regulator initialisation parameters.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 11:17:57 +01:00
Mark Brown ef60abbb6b regulator: core: Always use return value when regulator_dev_lookup() fails
Ensure that the return value is always set when we return now that the
logic has changed for regulator_get_optional() so we don't get missing
codes leaking out.

Reported-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 10:37:55 +01:00
Axel Lin f3ef11b485 regulator: wm831x-ldo: Fix max_uV for gp_ldo and aldo linear range settings
Fix the linear range settings in commit 5ff26a14c3
"regulator: wm831x-ldo: Convert to use linear ranges".

For wm831x_gp_ldo:
We have below equations for list voltage before converting to linear ranges:

sel <= 0xe:
        volt = 0.9-1.6V in 50mV steps
sel <= 0x1f:
        volt = 1.7-3.3V in 100mV steps

max_uV for the first linear range should be 1600000 rather than 1650000. Fix it.

For wm831x_aldo:
We have below equations for list voltage before converting to linear ranges:

sel <= 0xc:
        volt = 1-1.6V in 50mV steps
sel <= 0x1f
        volt = 1.7-3.5V in 100mV steps

max_uV for the first linear range should be 1600000 rather than 1650000. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-23 12:04:54 +01:00
Mark Brown 043c998f95 regulator: core: Fix return code for invalid parameters
We should be returning an error, a repeated call will never succeed.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-23 12:04:13 +01:00