Commit Graph

9 Commits (0dbc3463c8606e8122f3c8aea9815d0ef6e66bf9)

Author SHA1 Message Date
Mark Brown eb230d4a61 Merge remote-tracking branch 'regulator/topic/da9055' into regulator-next 2013-02-19 12:42:33 +00:00
Axel Lin 5551a6a0eb regulator: da9055: Remove unused v_shift field from struct da9055_volt_reg
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-07 11:14:53 +00:00
Greg Kroah-Hartman 3d68dfe324 Drivers: regulator: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:04 -08:00
Mark Brown adca48f7c6 Merge remote-tracking branch 'regulator/topic/min' into regulator-next 2012-12-10 12:43:00 +09: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
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
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
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
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