summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp8788-ldo.c
AgeCommit message (Collapse)Author
2013-09-30regulator: lp8788-ldo: use devm_regulator_register()Jingoo Han
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-05-12regulator: Remove all platform_set_drvdata(pdev, NULL) in driversAxel Lin
Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound", this is done by driver core after device_release or on probe failure. Thus we can remove all platform_set_drvdata(pdev, NULL) in drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-03regulator: lp8788: Implement list_voltage for lp8788_ldo_voltage_fixed_opsAxel Lin
For fixed voltage, we can just set min_uV and use regulator_list_voltage_linear for list_voltage callback. Regulator core will call list_voltage(rdev, 0) if both get_voltage get_voltage_sel are not implemented. Thus we can also remove lp8788_ldo_fixed_get_voltage() function. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-03regulator: lp8788: Remove lp8788_dldo_id and lp8788_aldo_id arraysAxel Lin
The id for DLDOx matches the entries in enum lp8788_ldo_id and it's easy to calculate the id for ALDOx. Thus remove lp8788_dldo_id and lp8788_aldo_id arrays. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04regulator: lp8788-ldo: use ena_pin of regulator-core for external controlKim, Milo
Regulator core driver provides enable GPIO control for enabling/disabling a regulator. Now, enable GPIO is shared among regulators. Use this internal working, so unnecessary code are removed. GPIO enable pin configurations are added in digital LDO and analog LDO drivers. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-07regulator: lp8788-ldo: Use ldo->en_pin to check if regulator is enabled by ↵Axel Lin
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-03lp8788-ldo: fix a parent device on devm_gpio_request()Kim, Milo
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-03lp8788-ldo: fix a parent device in _probe()Kim, Milo
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>
2012-12-10Merge remote-tracking branch 'regulator/topic/lp8788' into regulator-nextMark Brown
2012-12-07regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_modeAxel Lin
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-11-20regulator: remove use of __devexitBill Pemberton
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-20regulator: remove use of __devinitBill Pemberton
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-20regulator: remove use of __devexit_pBill Pemberton
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-10-15regulator: lp8788-ldo: Staticise non-exported symbolMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28regulator: lp8788-ldo: Set n_voltages to 1 for fixed voltageAxel Lin
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-07-20regulator: add new lp8788 regulator driverKim, Milo
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>