Hi Marco, On Wed, Jan 15, 2020 at 05:23:07PM +0100, Marco Felsch wrote: > 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 <m.felsch@xxxxxxxxxxxxxx> Reviewed-by: Stefan Lengfeld <contact@xxxxxxxxxxxxxxx> On Wed, Marco Flesch wrote [1]: > I will send a v2 to cover Guenter's suggestion. Can I keep your reviewed > by tag? Yes, you can keep it. See above. I also checked by reading the code that 'i2c_smbus_write_byte_data' behaves the same as 'i2c_transfer'. Just with some indirections. Kind regards, Stefan [1]: https://www.spinics.net/lists/linux-watchdog/msg17194.html