diff options
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/pcf50633-charger.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c index 338311996eea..47187337b96c 100644 --- a/drivers/power/pcf50633-charger.c +++ b/drivers/power/pcf50633-charger.c | |||
@@ -92,14 +92,18 @@ int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma) | |||
92 | chgmod = (mbcs2 & PCF50633_MBCS2_MBC_MASK); | 92 | chgmod = (mbcs2 & PCF50633_MBCS2_MBC_MASK); |
93 | 93 | ||
94 | /* If chgmod == BATFULL, setting chgena has no effect. | 94 | /* If chgmod == BATFULL, setting chgena has no effect. |
95 | * We need to set resume instead. | 95 | * Datasheet says we need to set resume instead but when autoresume is |
96 | * used resume doesn't work. Clear and set chgena instead. | ||
96 | */ | 97 | */ |
97 | if (chgmod != PCF50633_MBCS2_MBC_BAT_FULL) | 98 | if (chgmod != PCF50633_MBCS2_MBC_BAT_FULL) |
98 | pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_MBCC1, | 99 | pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_MBCC1, |
99 | PCF50633_MBCC1_CHGENA, PCF50633_MBCC1_CHGENA); | 100 | PCF50633_MBCC1_CHGENA, PCF50633_MBCC1_CHGENA); |
100 | else | 101 | else { |
102 | pcf50633_reg_clear_bits(pcf, PCF50633_REG_MBCC1, | ||
103 | PCF50633_MBCC1_CHGENA); | ||
101 | pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_MBCC1, | 104 | pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_MBCC1, |
102 | PCF50633_MBCC1_RESUME, PCF50633_MBCC1_RESUME); | 105 | PCF50633_MBCC1_CHGENA, PCF50633_MBCC1_CHGENA); |
106 | } | ||
103 | 107 | ||
104 | mbc->usb_active = charging_start; | 108 | mbc->usb_active = charging_start; |
105 | 109 | ||