diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2017-08-21 12:50:50 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-09-11 16:19:37 -0400 |
commit | db4fce8fcd87ba139a8c4fb0d9c57f3d70b6116c (patch) | |
tree | 211c5992c8343158dd4a1167997cb00d473aa2ca /drivers/power | |
parent | 91d3e90668009a9d0175f03fe0daf5285b78c6ba (diff) |
palmas: Add support for powering different ldos
It is not necessary that ldo1 is used to power on mmc.
So, add support for passing ldo registers for powering on mmc.
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/palmas.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/power/palmas.c b/drivers/power/palmas.c index 4e9895987cb..ddf777c26b1 100644 --- a/drivers/power/palmas.c +++ b/drivers/power/palmas.c @@ -42,24 +42,21 @@ int lp873x_mmc1_poweron_ldo(uint voltage) } #endif -int palmas_mmc1_poweron_ldo(uint voltage) +int palmas_mmc1_poweron_ldo(uint ldo_volt, uint ldo_ctrl, uint voltage) { u8 val = 0; #if defined(CONFIG_DRA7XX) int ret; - /* - * Currently valid for the dra7xx_evm board: - * Set TPS659038 LDO1 to 3.0 V or 1.8V - */ - ret = palmas_i2c_write_u8(TPS65903X_CHIP_P1, LDO1_VOLTAGE, voltage); + + ret = palmas_i2c_write_u8(TPS65903X_CHIP_P1, ldo_volt, voltage); if (ret) { printf("tps65903x: could not set LDO1 voltage.\n"); return ret; } /* TURN ON LDO1 */ val = RSC_MODE_SLEEP | RSC_MODE_ACTIVE; - ret = palmas_i2c_write_u8(TPS65903X_CHIP_P1, LDO1_CTRL, val); + ret = palmas_i2c_write_u8(TPS65903X_CHIP_P1, ldo_ctrl, val); if (ret) { printf("tps65903x: could not turn on LDO1.\n"); return ret; |