[PATCH 09/10] power: supply: bq24190: Disable watchdog with bq24190_write_mask()

From: Waqar Hameed

Date: Mon Jun 29 2026 - 11:53:06 EST


The watchdog is disabled by updating the register field with a
`bq24190_read()` and `bq24190_write()`. Combine this instead with
`bq24190_write_mask(..., 0)`.

Signed-off-by: Waqar Hameed <waqar.hameed@xxxxxxxx>
---
drivers/power/supply/bq24190_charger.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 6f8000cc700e7..987ef0e29eb15 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -751,10 +751,6 @@ static int bq24190_set_config(struct bq24190_dev_info *bdi)
int ret;
u8 v;

- ret = bq24190_read(bdi, BQ24190_REG_CTTC, &v);
- if (ret < 0)
- return ret;
-
/*
* According to the "Host Mode and default Mode" section of the
* manual, a write to any register causes the bq24190 to switch
@@ -763,9 +759,9 @@ static int bq24190_set_config(struct bq24190_dev_info *bdi)
* So, by simply turning off the WDT, we accomplish both with the
* same write.
*/
- v &= ~BQ24190_REG_CTTC_WATCHDOG_MASK;
-
- ret = bq24190_write(bdi, BQ24190_REG_CTTC, v);
+ ret = bq24190_write_mask(bdi, BQ24190_REG_CTTC,
+ BQ24190_REG_CTTC_WATCHDOG_MASK,
+ BQ24190_REG_CTTC_WATCHDOG_SHIFT, 0);
if (ret < 0)
return ret;

--
2.43.0