]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: core: introduce callbacks for atomic transfers
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 3 Apr 2019 12:40:10 +0000 (14:40 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 16 Apr 2019 11:08:11 +0000 (13:08 +0200)
commit9cf8218fee0f692344a8b002e3d9c254ddcdb6c5
treedcb74bf00cfff708620b95b6e0d1e7328f8d2106
parentab8af09ae1eea1cb838850eef1e4dd2c38247b6a
i2c: core: introduce callbacks for atomic transfers

We had the request to access devices very late when interrupts are not
available anymore multiple times now. Mostly to prepare shutdown or
reboot. Allow adapters to specify a specific callback for this case.
Note that we fall back to the generic {master|smbus}_xfer callback if
this new atomic one is not present. This is intentional to preserve the
previous behaviour and avoid regressions. Because there are drivers not
using interrupts or because it might have worked "accidently" before.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Stefan Lengfeld <contact@stefanchrist.eu>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-base.c
drivers/i2c/i2c-core-smbus.c
drivers/i2c/i2c-core.h
include/linux/i2c.h