Skip to content

Commit

Permalink
meta-yosemite4n: apply i2c test patch
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdog988 committed Aug 19, 2024
1 parent 59ef4c7 commit 97fea22
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
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

Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ SRC_URI:append = " file://1031-driver-watchdog-npcm-add-a-support-to-get-reset-c

SRC_URI:append = " file://1032-adc-npcm-increase-timeout-to-500ms.patch"
SRC_URI:append = " file://1033-i3c-expose-interface-for-doing-daa-request.patch"


# NPCM8XX i2c patch test
SRC_URI:append = " file://1111-driver-i2c-npcm7xx-do-not-return-0-if-i2c-recovery-o.patch"

0 comments on commit 97fea22

Please sign in to comment.