]> Git Repo - linux.git/commit
watchdog: da9062: make restart handler atomic safe
authorMarco Felsch <[email protected]>
Wed, 15 Jan 2020 16:23:07 +0000 (17:23 +0100)
committerWim Van Sebroeck <[email protected]>
Mon, 27 Jan 2020 14:55:49 +0000 (15:55 +0100)
commit057b52b4b3d58f4ee5944171da50f77b00a1bb0d
treeb7153c6afbc701725f038e778d0898ef301de0f5
parent9e5236e7cec110610f3bc824a4d535c1271e4bb5
watchdog: da9062: make restart handler atomic safe

The restart handler is executed during the shutdown phase which is
atomic/irq-less. The i2c framework supports atomic transfers since
commit 63b96983a5dd ("i2c: core: introduce callbacks for atomic
transfers") to address this use case. Using regmap within an atomic
context is allowed only if the regmap type is MMIO and the cache type
'flat' or no cache is used. Using the i2c_smbus_write_byte_data()
function can be done without additional tests because:
 1) the DA9062 is an i2c-only device and
 2) the i2c framework emulates the smbus protocol if the host adapter
    does not support smbus_xfer by using the master_xfer.

Signed-off-by: Marco Felsch <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Reviewed-by: Stefan Lengfeld <[email protected]>
Tested-by: Stefan Lengfeld <[email protected]>
Reviewed-by: Adam Thomson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
drivers/watchdog/da9062_wdt.c
This page took 0.050277 seconds and 4 git commands to generate.