Draft: i2c: imx: Fix deadlock issues
- Oct 01, 2024
-
-
Like other i2c controllers we see deadlock issues with clock prepare mutex. In our case this came up with a clock output of a rtc connected to i2c bus. This issue has already been fixed upstream by: (d9a22d71) i2c: imx: avoid taking clk_prepare mutex in PM callbacks But was reintroduced by a wrongly resolved merge conflict with this commit: (d59c7185) MLK-11403: I2C: imx: restore pin setting for i2c So again we keep the i2c clock prepared and only enable and disable it for a transfer. REFERENCE: https://github.com/nxp-imx/linux-imx/pull/21
22494098 -
As clk_get_rate() also keeps the clk prepare lock which can lead into a deadlock. It was removed upstream with this commit: (90ad2cbe) i2c: imx: use clk notifier for rate changes But it has been readded again with: (d2561688) MLK-20368 i2c-imx: Coverity: fix divide by zero warning The commit message does not explain why it was readded. It is not needed as the clk notifier is used. Removed it again. REFERENCE: https://github.com/nxp-imx/linux-imx/pull/21
cd2f1a54
-