forked from facebook/openbmc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-yosemite4n: apply i2c test patch
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...ernel/linux/linux-nuvoton/1111-driver-i2c-npcm7xx-do-not-return-0-if-i2c-recovery-o.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From f851617228144a84d1323b24c5d2702cb06b2bd4 Mon Sep 17 00:00:00 2001 | ||
From: Joseph Liu <[email protected]> | ||
Date: Mon, 19 Aug 2024 15:26:10 +0800 | ||
Subject: [PATCH] driver: i2c: npcm7xx: do not return 0 if i2c recovery ok | ||
Signed-off-by: Joseph Liu <[email protected]> | ||
|
||
--- | ||
drivers/i2c/busses/i2c-npcm7xx.c | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c | ||
index 6e649dc6c..dc3802680 100644 | ||
--- a/drivers/i2c/busses/i2c-npcm7xx.c | ||
+++ b/drivers/i2c/busses/i2c-npcm7xx.c | ||
@@ -2268,7 +2268,8 @@ static int npcm_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, | ||
|
||
/* if there was BER, check if need to recover the bus: */ | ||
if (bus->cmd_err == -EAGAIN) | ||
- bus->cmd_err = i2c_recover_bus(adap); | ||
+ if (i2c_recover_bus(adap) != 0) | ||
+ bus->cmd_err = -ENOTRECOVERABLE; | ||
|
||
/* | ||
* After any type of error, check if LAST bit is still set, | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters