Skip to content

Commit e3f9a7e

Browse files
committed
power: supply: ln8411: Enables AUTO_CLEAR_LATCHED_STS at hw_init
Sets AUTO_CLEAR_LATCHED_STS to '1' at hw_init. This bit clears latched status bits when CP_EN is toggled. Change-Id: I58671ddf4125ccd345b23a6408d691ebf0a37097 Signed-off-by: Ricardo Rivera-Matos <[email protected]>
1 parent b48e8b3 commit e3f9a7e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/power/supply/ln8411_charger.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,6 +2324,10 @@ static int ln8411_hw_init(struct ln8411_device *ln8411)
23242324
if (ln8411->role > LN8411_DUAL)
23252325
return ln8411_cfg_sync(ln8411);
23262326

2327+
ret = regmap_set_bits(ln8411->regmap, LN8411_ADC_CFG_2, LN8411_AUTO_CLEAR_LATCHED_STS);
2328+
if (ret)
2329+
return ret;
2330+
23272331
ret = regmap_set_bits(ln8411->regmap, LN8411_LION_INT_MASK_2, LN8411_PAUSE_INT_UPDATE);
23282332
if (ret)
23292333
return ret;

drivers/power/supply/ln8411_charger.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@
318318
#define LN8411_B0_DEV_REV_ID 0xa020
319319

320320
#define LN8411_ADC_CFG_2 0x76
321+
#define LN8411_AUTO_CLEAR_LATCHED_STS BIT(7)
321322
#define LN8411_PAUSE_ADC_UPDATES BIT(5)
322323

323324
#define LN8411_LION_COMP_CTRL_1 0x79

0 commit comments

Comments
 (0)