diff options
Diffstat (limited to 'drivers/regulator/tps65910-regulator.c')
-rw-r--r-- | drivers/regulator/tps65910-regulator.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 15b5f1ec17b7..b0533c111571 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
@@ -28,7 +28,8 @@ | |||
28 | #define TPS65910_SUPPLY_STATE_ENABLED 0x1 | 28 | #define TPS65910_SUPPLY_STATE_ENABLED 0x1 |
29 | #define EXT_SLEEP_CONTROL (TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 | \ | 29 | #define EXT_SLEEP_CONTROL (TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 | \ |
30 | TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2 | \ | 30 | TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2 | \ |
31 | TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3) | 31 | TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3 | \ |
32 | TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP) | ||
32 | 33 | ||
33 | /* supported VIO voltages in milivolts */ | 34 | /* supported VIO voltages in milivolts */ |
34 | static const u16 VIO_VSEL_table[] = { | 35 | static const u16 VIO_VSEL_table[] = { |
@@ -922,6 +923,8 @@ static int tps65910_set_ext_sleep_config(struct tps65910_reg *pmic, | |||
922 | TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2) != 0); | 923 | TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2) != 0); |
923 | en_count += ((ext_sleep_config & | 924 | en_count += ((ext_sleep_config & |
924 | TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3) != 0); | 925 | TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3) != 0); |
926 | en_count += ((ext_sleep_config & | ||
927 | TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP) != 0); | ||
925 | if (en_count > 1) { | 928 | if (en_count > 1) { |
926 | dev_err(mfd->dev, | 929 | dev_err(mfd->dev, |
927 | "External sleep control flag is not proper\n"); | 930 | "External sleep control flag is not proper\n"); |
@@ -1018,12 +1021,18 @@ static int tps65910_set_ext_sleep_config(struct tps65910_reg *pmic, | |||
1018 | 1021 | ||
1019 | ret = tps65910_clear_bits(mfd, | 1022 | ret = tps65910_clear_bits(mfd, |
1020 | TPS65910_SLEEP_KEEP_LDO_ON + regoffs, bit_pos); | 1023 | TPS65910_SLEEP_KEEP_LDO_ON + regoffs, bit_pos); |
1021 | if (!ret) | 1024 | if (!ret) { |
1022 | ret = tps65910_set_bits(mfd, | 1025 | if (ext_sleep_config & TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP) |
1023 | TPS65910_SLEEP_SET_LDO_OFF + regoffs, bit_pos); | 1026 | ret = tps65910_set_bits(mfd, |
1027 | TPS65910_SLEEP_SET_LDO_OFF + regoffs, bit_pos); | ||
1028 | else | ||
1029 | ret = tps65910_clear_bits(mfd, | ||
1030 | TPS65910_SLEEP_SET_LDO_OFF + regoffs, bit_pos); | ||
1031 | } | ||
1024 | if (ret < 0) | 1032 | if (ret < 0) |
1025 | dev_err(mfd->dev, | 1033 | dev_err(mfd->dev, |
1026 | "Error in configuring SLEEP register\n"); | 1034 | "Error in configuring SLEEP register\n"); |
1035 | |||
1027 | return ret; | 1036 | return ret; |
1028 | } | 1037 | } |
1029 | 1038 | ||