Skip to content

Commit 88fe307

Browse files
marcanAndi Shyti
authored andcommitted
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]>
1 parent 25909e1 commit 88fe307

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-pasemi-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static inline int reg_read(struct pasemi_smbus *smbus, int reg)
7171

7272
static void pasemi_reset(struct pasemi_smbus *smbus)
7373
{
74-
u32 val = (CTL_MTR | CTL_MRR | (smbus->clk_div & CTL_CLK_M));
74+
u32 val = (CTL_MTR | CTL_MRR | CTL_UJM | (smbus->clk_div & CTL_CLK_M));
7575

7676
if (smbus->hw_rev >= 6)
7777
val |= CTL_EN;

0 commit comments

Comments
 (0)