android_kernel_motorola_sm6375/drivers/i2c
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Benjamin Bara 5af5e946c4 i2c: core: Fix atomic xfer check for non-preempt config
commit a3368e1186e3ce8e38f78cbca019622095b1f331 upstream.

Since commit aa49c90894d0 ("i2c: core: Run atomic i2c xfer when
!preemptible"), the whole reboot/power off sequence on non-preempt kernels
is using atomic i2c xfer, as !preemptible() always results to 1.

During device_shutdown(), the i2c might be used a lot and not all busses
have implemented an atomic xfer handler. This results in a lot of
avoidable noise, like:

[   12.687169] No atomic I2C transfer handler for 'i2c-0'
[   12.692313] WARNING: CPU: 6 PID: 275 at drivers/i2c/i2c-core.h:40 i2c_smbus_xfer+0x100/0x118
...

Fix this by allowing non-atomic xfer when the interrupts are enabled, as
it was before.

Link: https://lore.kernel.org/r/20231222230106.73f030a5@yea
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/linux-i2c/[email protected]/
Fixes: aa49c90894d0 ("i2c: core: Run atomic i2c xfer when !preemptible")
Cc: [email protected] # v5.2+
Signed-off-by: Benjamin Bara <[email protected]>
Tested-by: Michael Walle <[email protected]>
Tested-by: Tor Vic <[email protected]>
[wsa: removed a comment which needs more work, code is ok]
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2024-01-15 18:25:27 +01:00
..
algos
busses i2c: aspeed: Handle the coalesced stop conditions with the start conditions. 2024-01-08 11:29:45 +01:00
muxes i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node() 2023-11-08 11:23:36 +01:00
i2c-boardinfo.c
i2c-core-acpi.c
i2c-core-base.c
i2c-core-of.c
i2c-core-slave.c
i2c-core-smbus.c
i2c-core.h i2c: core: Fix atomic xfer check for non-preempt config 2024-01-15 18:25:27 +01:00
i2c-dev.c
i2c-mux.c i2c: mux: Avoid potential false error message in i2c_mux_add_adapter 2023-10-25 11:53:23 +02:00
i2c-slave-eeprom.c
i2c-smbus.c
i2c-stub.c
Kconfig
Makefile