aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorHector Martin <[email protected]>2025-04-27 11:30:43 +0000
committerAndi Shyti <[email protected]>2025-05-19 20:23:56 +0000
commit88fe3078b54c9efaea7d1adfcf295e37dfb0274f (patch)
tree19a8c8eca2a520a2e05c8ce3a779e0528fb10da8 /drivers/i2c
parenti2c: iproc: Remove unnecessary double negation (diff)
downloadkernel-88fe3078b54c9efaea7d1adfcf295e37dfb0274f.tar.gz
kernel-88fe3078b54c9efaea7d1adfcf295e37dfb0274f.zip
i2c: pasemi: Enable the unjam machine
The I2C bus can get stuck under some conditions (desync between controller and device). The pasemi controllers include an unjam feature that is enabled on reset, but was being disabled by the driver. Keep it enabled by explicitly setting the UJM bit in the CTL register. This should help recover the bus from certain conditions, which would otherwise remain stuck forever. Signed-off-by: Hector Martin <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Sven Peter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andi Shyti <[email protected]>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-pasemi-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-pasemi-core.c b/drivers/i2c/busses/i2c-pasemi-core.c
index df1b0087dcac..3f5571a90c1d 100644
--- a/drivers/i2c/busses/i2c-pasemi-core.c
+++ b/drivers/i2c/busses/i2c-pasemi-core.c
@@ -71,7 +71,7 @@ static inline int reg_read(struct pasemi_smbus *smbus, int reg)
static void pasemi_reset(struct pasemi_smbus *smbus)
{
- u32 val = (CTL_MTR | CTL_MRR | (smbus->clk_div & CTL_CLK_M));
+ u32 val = (CTL_MTR | CTL_MRR | CTL_UJM | (smbus->clk_div & CTL_CLK_M));
if (smbus->hw_rev >= 6)
val |= CTL_EN;