regulator: lp8788-ldo: Use ldo->en_pin to check if regulator is enabled by external pin
authorAxel Lin <axel.lin@ingics.com>
Sat, 5 Jan 2013 07:33:43 +0000 (15:33 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 7 Jan 2013 11:13:08 +0000 (11:13 +0000)
commitb9bb09111a4f5dbf8a0bd7df77ec79d3fdf9e5d2
tree90d54e6b8a6c3369dc585f5f6f1de6fd324c7aa5
parentf02a3917b3bc65149cc077396896f2ae5a2fbe4a
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>
drivers/regulator/lp8788-ldo.c