]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: pm8916_wdt: Avoid read of write-only PET register
authorStephan Gerhold <stephan.gerhold@kernkonzept.com>
Wed, 29 Jun 2022 08:48:14 +0000 (10:48 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 23 Jul 2022 12:21:27 +0000 (14:21 +0200)
commitd6a4ad9088f3602ff47a53e682918b43dd46acf1
tree06e7542e27942743f846e6153e436fcee52b71e6
parentfd0e2475e83b2c9be6d0ff449005cbe92aef821b
watchdog: pm8916_wdt: Avoid read of write-only PET register

PMIC_WD_RESET_PET is a write-only register that is used to ping
the watchdog. It does not make sense to use read-modify-write
for it: a register read will never return anything but zero.
(And actually even if it did we would still want to write again
to ensure the watchdog is pinged.)

Reduce the overhead for the watchdog ping slightly by using
regmap_write() directly instead.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220629084816.125515-2-stephan.gerhold@kernkonzept.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/pm8916_wdt.c