Skip to content

Commit f0ee3ce

Browse files
marcanjannau
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 <marcan@marcan.st>
1 parent a3650ab commit f0ee3ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

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

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

7878
if (smbus->hw_rev >= 6)
7979
val |= CTL_EN;

0 commit comments

Comments
 (0)