From 50ffe6eedbd8d1ff8fbc2b451bbade8ca3063487 Mon Sep 17 00:00:00 2001 From: Waqar Hameed Date: Mon, 29 Jun 2026 17:44:59 +0200 Subject: power: supply: bq24190: Disable watchdog with bq24190_write_mask() 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 Link: https://patch.msgid.link/efa4524aa6879fd4452807f747a9e522183246a1.1782746851.git.waqar.hameed@axis.com Signed-off-by: Sebastian Reichel --- 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 19f5c61a2986..906b572c708f 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; -- cgit v1.2.3