]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
i2c: cbus-gpio: set atomic transfer callback
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sat, 27 Nov 2021 19:42:14 +0000 (21:42 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:08 +0000 (09:49 +0100)
commit6bf46dd43c44389d71cfc67fa9765ac2f9d884ae
tree29d8b6d1cbf44886a4429ffd7aadc968677cf6e9
parentce4db017c5b48a4722b9f83436cbf8a8494001cc
i2c: cbus-gpio: set atomic transfer callback

BugLink: https://bugs.launchpad.net/bugs/1953731
commit b12764695c3fcade145890b67f82f8b139174cc7 upstream.

CBUS transfers have always been atomic, but after commit 63b96983a5dd
("i2c: core: introduce callbacks for atomic transfers") we started to see
warnings during e.g. poweroff as the atomic callback is not explicitly set.
Fix that.

Fixes the following WARNING seen during Nokia N810 power down:

[  786.570617] reboot: Power down
[  786.573913] ------------[ cut here ]------------
[  786.578826] WARNING: CPU: 0 PID: 672 at drivers/i2c/i2c-core.h:40 i2c_smbus_xfer+0x100/0x110
[  786.587799] No atomic I2C transfer handler for 'i2c-2'

Fixes: 63b96983a5dd ("i2c: core: introduce callbacks for atomic transfers")
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/i2c/busses/i2c-cbus-gpio.c