kernel_samsung_a53x/drivers/i2c/busses
Marek Vasut 1a1b7fd713 i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resume
commit 048bbbdbf85e5e00258dfb12f5e368f908801d7b upstream.

In case there is any sort of clock controller attached to this I2C bus
controller, for example Versaclock or even an AIC32x4 I2C codec, then
an I2C transfer triggered from the clock controller clk_ops .prepare
callback may trigger a deadlock on drivers/clk/clk.c prepare_lock mutex.

This is because the clock controller first grabs the prepare_lock mutex
and then performs the prepare operation, including its I2C access. The
I2C access resumes this I2C bus controller via .runtime_resume callback,
which calls clk_prepare_enable(), which attempts to grab the prepare_lock
mutex again and deadlocks.

Since the clock are already prepared since probe() and unprepared in
remove(), use simple clk_enable()/clk_disable() calls to enable and
disable the clock on runtime suspend and resume, to avoid hitting the
prepare_lock mutex.

Acked-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Fixes: 4e7bca6fc07b ("i2c: i2c-stm32f7: add PM Runtime support")
Cc: <stable@vger.kernel.org> # v5.0+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:21:42 +01:00
..
acpm-mfd-bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-acorn.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-ali15x3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-ali1535.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-ali1563.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-altera.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-amd-mp2-pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-amd-mp2-plat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-amd-mp2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-amd756-s4882.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-amd756.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-amd8111.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-aspeed.c i2c: aspeed: Update the stop sw state when the bus recovery occurs 2024-11-23 23:21:34 +01:00
i2c-at91-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-at91-master.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-at91-slave.c i2c: at91: Fix the functionality flags of the slave-only interface 2024-11-19 14:19:05 +01:00
i2c-at91.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-au1550.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-axxia.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-bcm-iproc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-bcm-kona.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-bcm2835.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-brcmstb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-cadence.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-cbus-gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-cht-wc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-cpm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-cros-ec-tunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-davinci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-designware-baytrail.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-designware-common.c i2c: designware: Fix corrupted memory seen in the ISR 2024-11-18 12:11:18 +01:00
i2c-designware-core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-designware-master.c i2c: designware: Disable TX_EMPTY irq while waiting for block length byte 2024-11-18 11:43:30 +01:00
i2c-designware-pcidrv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-designware-platdrv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-designware-slave.c i2c: designware: Fix the functionality flags of the slave-only interface 2024-11-19 14:19:05 +01:00
i2c-digicolor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-diolan-u2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-dln2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-efm32.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-eg20t.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-elektor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-emev2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-exynos5.c i2c: exynos5: Silence noisy error and info logs 2024-11-17 17:45:37 +01:00
i2c-exynos5.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-fsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-highlander.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-hix5hd2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-hydra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-i801.c i2c: i801: Annotate apanel_addr as __ro_after_init 2024-11-19 14:19:40 +01:00
i2c-ibm_iic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-ibm_iic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-icy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-img-scb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-imx-lpi2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-imx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-iop3xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-iop3xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-isch.c i2c: isch: Add missed 'else' 2024-11-23 23:21:34 +01:00
i2c-ismt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-jz4780.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-kempld.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-lpc2k.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-meson.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mlxbf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mlxcpld.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mpc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mt65xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mt7621.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mv64xxx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mxs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-nforce2-s4985.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-nforce2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-nomadik.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-npcm7xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-nvidia-gpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-ocores.c i2c: ocores: set IACK bit after core is enabled 2024-11-19 14:19:10 +01:00
i2c-octeon-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-octeon-core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-octeon-platdrv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-omap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-opal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-owl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-parport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-pasemi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-pca-isa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-pca-platform.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-piix4.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-pmcmsp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-pnx.c i2c: pnx: Fix potential deadlock warning from del_timer_sync() call in isr 2024-11-19 14:19:42 +01:00
i2c-powermac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-pxa-pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-pxa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-qcom-cci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-qcom-geni.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-qup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-rcar.c i2c: rcar: fix error code in probe() 2024-11-19 14:19:46 +01:00
i2c-riic.c i2c: riic: avoid potential division by zero 2024-11-23 23:20:44 +01:00
i2c-rk3x.c i2c: rk3x: fix potential spinlock recursion on poll 2024-11-18 12:12:17 +01:00
i2c-robotfuzz-osif.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-s3c2410.c i2c: s3c24xx: fix transferring more than one message in polling mode 2024-11-18 12:12:52 +01:00
i2c-scmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sh7760.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sh_mobile.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sibyte.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-simtec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sirf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sis96x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sis630.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sis5595.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sprd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-st.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-stm32.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-stm32.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-stm32f4.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-stm32f7.c i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resume 2024-11-23 23:21:42 +01:00
i2c-stu300.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-sun6i-p2wi.c i2c: sun6i-p2wi: Prevent potential division by zero 2024-11-18 11:43:14 +01:00
i2c-synquacer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-taos-evm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-tegra-bpmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-tegra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-thunderx-pcidrv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-tiny-usb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-uniphier-f.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-uniphier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-versatile.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-via.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-viapro.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-viperboard.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-wmt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-xgene-slimpro.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-xiic.c i2c: xiic: Try re-initialization on bus busy timeout 2024-11-23 23:21:36 +01:00
i2c-xlp9xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-xlr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-zx2967.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scx200_acb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00