Commit graph

1408 commits

Author SHA1 Message Date
Laxman Dewangan 504382c99d regulator: palmas: add input supply names
Palmas regulator support the different input supply pins for each of
the rails. Fill the regulator info data with their input supply pin
names.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-28 00:26:04 +00:00
Ian Lartey 574651f0f8 regulator: palmas remove palmas-charger option from DT bindings
Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-25 01:07:25 +00:00
Laxman Dewangan bbcf50b1d6 regulator: palmas: rename probe/remove callback functions
When palmas regulator probe creates stack dump during initialization
due to some crash, it prints the call trace as follows:
[3.166321] [<c028fa20>] (_regmap_read+0x5c/0xa8) from [<c028fab0>] (regmap_read+0x44/0x5c)
[3.174669] [<c028fab0>] (regmap_read+0x44/0x5c) from [<c023062c>] (palmas_probe+0x240/0x7d0)
[3.183193] [<c023062c>] (palmas_probe+0x240/0x7d0) from [<c0284064>] (platform_drv_probe+0x14/0x18)
[3.192322] [<c0284064>] (platform_drv_probe+0x14/0x18) from [<c0282ee4>] (driver_probe_device+0x104/0x214)
[3.202055] [<c0282ee4>] (driver_probe_device+0x104/0x214) from [<c028167c>] (bus_for_each_drv+0x5c/0x88)

The palmas_probe is current name but it helps on debugging if the
function name is more appropriate to the sub-module name.

Renaming the palmas_probe() to palmas_regulator_probe() and
palmas_remove() to palams_regulator_remove().

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-20 13:38:09 +01:00
Axel Lin 71f2146f6c regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property
It does not make sense to assign return value of of_property_read_u32() to
pdata->reg_init[idx]->warm_reset. Use of_property_read_bool() to read
"ti,warm-reset" DT property instead which will return correct setting
for pdata->reg_init[idx]->warm_reset.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-12 18:16:17 +00:00
Graeme Gregory 7be859f74c regulator: palmas correct dt parsing
Fix the DT parsing to agree with the bindings document. Some small changes
to the value names and also fix the handling of boolean values. They were
previously using prop = 1/0, now just use of_property_read_bool calls.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-08 17:34:04 +08:00
J Keerthy 3c870e3f9d regulator: palmas: Change the DT node property names to follow the convention
DT node properties should not have "_". Replacing them by "-".

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04 10:54:42 +08:00
Mark Brown 2730fd82cb Merge remote-tracking branch 'regulator/topic/tps65090' into regulator-next 2013-02-19 12:43:12 +00:00
Mark Brown da3522f85b Merge remote-tracking branch 'regulator/topic/tps6507x' into regulator-next 2013-02-19 12:43:10 +00:00
Mark Brown b67a2ecb54 Merge remote-tracking branch 'regulator/topic/tps51632' into regulator-next 2013-02-19 12:43:09 +00:00
Mark Brown 178a097d5e Merge remote-tracking branch 'regulator/topic/s5m8767' into regulator-next 2013-02-19 12:43:08 +00:00
Mark Brown 728088871c Merge remote-tracking branch 'regulator/topic/palmas' into regulator-next 2013-02-19 12:43:07 +00:00
Mark Brown cf1466fbf8 Merge remote-tracking branch 'regulator/topic/of' into regulator-next 2013-02-19 12:42:52 +00:00
Mark Brown c99f21c276 Merge remote-tracking branch 'regulator/topic/mc13892' into regulator-next 2013-02-19 12:42:50 +00:00
Mark Brown e11c4515e3 Merge remote-tracking branch 'regulator/topic/max8998' into regulator-next 2013-02-19 12:42:49 +00:00
Mark Brown 6a244cadb0 Merge remote-tracking branch 'regulator/topic/max8997' into regulator-next 2013-02-19 12:42:49 +00:00
Mark Brown 1fe230175e Merge remote-tracking branch 'regulator/topic/max77686' into regulator-next 2013-02-19 12:42:48 +00:00
Mark Brown c7b094828b Merge remote-tracking branch 'regulator/topic/lp8788' into regulator-next 2013-02-19 12:42:47 +00:00
Mark Brown 800d290182 Merge remote-tracking branch 'regulator/topic/lp8755' into regulator-next 2013-02-19 12:42:46 +00:00
Mark Brown efc828022e Merge remote-tracking branch 'regulator/topic/lp872x' into regulator-next 2013-02-19 12:42:39 +00:00
Mark Brown 5ce63c7e7d Merge remote-tracking branch 'regulator/topic/lp3972' into regulator-next 2013-02-19 12:42:35 +00:00
Mark Brown 5ec2a5e8e5 Merge remote-tracking branch 'regulator/topic/lp3971' into regulator-next 2013-02-19 12:42:35 +00:00
Mark Brown a4dba88e63 Merge remote-tracking branch 'regulator/topic/gpio' into regulator-next 2013-02-19 12:42:34 +00:00
Mark Brown eb230d4a61 Merge remote-tracking branch 'regulator/topic/da9055' into regulator-next 2013-02-19 12:42:33 +00:00
Mark Brown 52582adcb9 Merge remote-tracking branch 'regulator/topic/core' into regulator-next 2013-02-19 12:42:32 +00:00
Mark Brown 20ab4a7a79 Merge remote-tracking branch 'regulator/topic/as3711' into regulator-next 2013-02-19 12:42:31 +00:00
Mark Brown 45aae62ddd Merge remote-tracking branch 'regulator/topic/arizona' into regulator-next 2013-02-19 12:42:30 +00:00
Mark Brown fc221525bd Merge remote-tracking branch 'regulator/topic/apply' into regulator-next 2013-02-19 12:42:29 +00:00
Mark Brown 0dbf165ec4 Merge remote-tracking branch 'regulator/topic/anatop' into regulator-next 2013-02-19 12:42:28 +00:00
Russ Dill 9c7b4e8a8a regulator: Fix memory garbage dev_err printout.
commit dd8004af: 'regulator: core: Log when a device causes a voltage
constraint fail', tried to print out some information about the
check consumer min/max uV fixup, however, it uses a garbage pointer
left over from list_for_each_entry leading to boot messages in the
form:

'[    2.079890] <RANDOM ASCII>: Restricting voltage, 3735899821-4294967295uV'

Because it references regulator->dev, it could potentially read memory from
anywhere causing a panic.

This patch instead uses rdev and the updated min/max uV values.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-14 16:18:39 +00:00
Mark Brown f2e5d078f7 Linux 3.8-rc7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQEcBAABAgAGBQJRFWw4AAoJEHm+PkMAQRiGnTAH/jBHA2umNc3lc7VkUpusve4q
 GGIlNzYh6iuvIGwKQVj9YPsl37qtQnkDUmY8f8WxZjfxiIDw3TkRKDgNLJaM3Jy5
 E426/FGlRx/Iia5+4tuBeoVYMoIPnndgW5lEAMRK1SvhTByhIYAXsaM0UwPBetb+
 Z5NMdH1f1HVF7RCCmHAkzEk9z78UpdeCzI0t0XuasP2hp2ARAcE1okdO7fNaLiyo
 EmenGhRvy9bAsbRwV0rCdl0rQiZXEYM353DWS7n6q4fyVm8MXFwloUxnWCJTzOIL
 ZLJaz18adFj7Ip/X6ksnMQiQU2Q3B7aThs5ycv0QGxxL2rDFveYRRQ5ICrXOy3M=
 =jjBc
 -----END PGP SIGNATURE-----

Merge tag 'v3.8-rc7' into regulator-core

Linux 3.8-rc7
2013-02-14 16:13:19 +00:00
Thiago Farina 40e72149a2 regulator: max77686: Reuse rdev_get_id() function.
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-14 12:11:04 +00:00
Axel Lin d94d9aca5b regulator: tps51632: Use regulator_[get|set]_voltage_sel_regmap
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>
2013-02-13 12:58:40 +00:00
Axel Lin 09ca50d2ad regulator: as3711: Fix checking if no platform initialization data
To skip registering regulator if no platform initialization data,
we should check reg_data rather than ri->desc.name.

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>
2013-02-13 12:56:51 +00:00
Axel Lin e81d7bc89c regulator: s5m8767: Prevent possible NULL pointer dereference
s5m8767_pmic_dt_parse_pdata dereferenes pdata, thus check pdata earlier to
avoid NULL pointer dereference.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-13 12:52:19 +00:00
Axel Lin cbb0ed495c regulator: s5m8767: Fix dev argument for devm_kzalloc and of_get_regulator_init_data
Use &pdev->dev rather than iodev->dev for devm_kzalloc() and
of_get_regulator_init_data(), this fixes memory leak.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-13 12:52:18 +00:00
Axel Lin c66a566afb regulator: core: Optimize _regulator_do_set_voltage if voltage does not change
Optimize _regulator_do_set_voltage() for the case selector is equal to
old_selector. Since the voltage does not change, we don't need to call
set_voltage_sel() and set_voltage_time_sel() in this case.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-08 11:26:03 +00:00
Axel Lin c6163a7023 regulator: max8998: Let regulator core handle the case selector == old_selector
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-08 11:23:43 +00:00
Axel Lin 1f91b6f6c7 regulator: s5m8767: Use of_get_child_count()
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-08 11:16:40 +00:00
Shawn Guo ff1ce0571e regulator: anatop: improve precision of delay time
For cpufreq example, it takes 13 steps (25 mV for one step) to increase
vddcore from 0.95 V to 1.275 V, and the time of 64 clock cycles at
24 MHz for one step is ~2.67 uS, so the total delay time would be
~34.71 uS.  But the current calculation in the driver gives 39 uS.
Change the formula to have the addition of 1 be the last step, so that
we can get a more precise delay time.  For example above, the new
formula will give 35 uS.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-08 11:15:00 +00:00
Mark Brown 53e5da79fa Merge remote-tracking branch 'regulator/fix/tps65910' into tmp 2013-02-06 11:28:53 +00:00
Mark Brown e04702c8b2 Merge remote-tracking branch 'regulator/fix/tps65217' into tmp 2013-02-06 11:28:52 +00:00
Mark Brown 918d623b04 Merge remote-tracking branch 'regulator/fix/s2mps11' into tmp 2013-02-06 11:28:51 +00:00
Mark Brown 44784cb32b Merge remote-tracking branch 'regulator/fix/of' into tmp 2013-02-06 11:28:51 +00:00
Mark Brown 98380536ee Merge remote-tracking branch 'regulator/fix/max8998' into tmp 2013-02-06 11:28:50 +00:00
Mark Brown 3886f91b96 Merge remote-tracking branch 'regulator/fix/max8997' into tmp 2013-02-06 11:28:49 +00:00
Mark Brown c48c43aa2d Merge remote-tracking branch 'regulator/fix/max8907' into tmp 2013-02-06 11:28:48 +00:00
Mark Brown ac58291c75 Merge remote-tracking branch 'regulator/fix/max77686' into tmp 2013-02-06 11:28:48 +00:00
Michał Mirosław 896b65f345 regulator: show state for GPIO-controlled regulators
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 18:38:06 +00:00
Amit Daniel Kachhap 26aec009f6 regulator: add device tree support for s5m8767
This device tree support is added for PMIC block of S5m8767 multi
function driver. The usage detail is added in the device tree
documentation section. This change is tested on exynos5250 based
arndale platform by regulator voltage set/get API's.

Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 10:31:31 +00:00
Axel Lin f33d0081ff regulator: palmas: Remove a redundant setting for warm_reset
Current code read "ti,warm_reset" of property twice, and set
pdata->reg_init[idx]->warm_reset twice. Read and set it once is enough.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 10:24:35 +00:00