]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: npcm: Add clock toggle recovery
authorTali Perry <tali.perry1@gmail.com>
Fri, 28 Mar 2025 19:32:50 +0000 (19:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:33 +0000 (11:07 +0100)
commite9a83fe283f142dcfe55b463df417b402b045d6e
tree31c378b7a38060f7aee4c7bcae65adfa3a8948d7
parentc39d1a9ae4ad66afcecab124d7789722bfe909fa
i2c: npcm: Add clock toggle recovery

[ Upstream commit 38010591a0fc3203f1cee45b01ab358b72dd9ab2 ]

During init of the bus, the module checks that the bus is idle.
If one of the lines are stuck try to recover them first before failing.
Sometimes SDA and SCL are low if improper reset occurs (e.g., reboot).

Signed-off-by: Tali Perry <tali.perry1@gmail.com>
Signed-off-by: Mohammed Elbadry <mohammed.0.elbadry@gmail.com>
Reviewed-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Link: https://lore.kernel.org/r/20250328193252.1570811-1-mohammed.0.elbadry@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-npcm7xx.c