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 <marcan@marcan.st> Reviewed-by: Neal Gompa <neal@gompa.dev> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: Sven Peter <sven@svenpeter.dev> Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-1-af28568296c0@svenpeter.dev Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
1 parent 25909e1 commit 88fe307

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
@@ -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)