Commit Graph

11 Commits

Author SHA1 Message Date
Axel Lin
b9bb09111a regulator: lp8788-ldo: Use ldo->en_pin to check if regulator is enabled by external pin
ldo->en_pin is set iff the regulator is enabled by external pin.

This patch sets ldo->en_pin to NULL if lp8788_gpio_request_ldo_en() fails, then
we can use it to determinate if the regulator is controlled by external pin or
register.

lp8788_get_ldo_enable_mode(), lp8788_ldo_ctrl_by_extern_pin() and
lp8788_ldo_is_enabled_by_extern_pin() functions are not used now, remove them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Milo Kim <milo.kim@ti.com>
Tested-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-07 11:13:08 +00:00
Kim, Milo
f02a3917b3 lp8788-ldo: fix a parent device on devm_gpio_request()
Use 'platform_device' rather than i2c client device node.
 Argument is added in lp8788_config_ldo_enable_mode().

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-03 11:28:53 +00:00
Kim, Milo
939e88f090 lp8788-ldo: fix a parent device in _probe()
The lp8788-ldo is a platform driver of lp8788-mfd.
 The platform device is allocated when mfd_add_devices() is called
 in lp8788-mfd.
 On the other hand, 'lp->dev' is the i2c client device.

 Therefore, this 'platform_device' is a proper parent device in case of
 resource managed mem alloc, registering regulators and device kernel messages.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-03 11:28:53 +00:00
Mark Brown
a8bfb69e77 Merge remote-tracking branch 'regulator/topic/lp8788' into regulator-next 2012-12-10 12:42:57 +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
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
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
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
Axel Lin
74c8cfdaa6 regulator: lp8788-ldo: Set n_voltages to 1 for fixed voltage
For fixed voltage, the n_voltages should be 1 rather than 0.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:24 -07:00
Kim, Milo
ade7515fef regulator: add new lp8788 regulator driver
TI LP8788 PMU has 4 BUCKS and 22 LDOs.
The voltage of BUCK1 and BUCK2 can be controlled by external gpios.
And some LDOs also can be enabled by external gpios.
The regmap interface is used for regulator operations.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-20 11:12:15 +01:00