[PATCH 1/3] misc: atsha204a: return timeout from wakeup function

Adrian Fiergolski adrian.fiergolski at fastree3d.com
Tue Dec 21 17:17:20 CET 2021


If the maximum number of wake-up attempts is exceeded, return -ETIMEDOUT.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski at fastree3d.com>
---
 drivers/misc/atsha204a-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 715dabb279..9d069fb33c 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -240,10 +240,10 @@ int atsha204a_wakeup(struct udevice *dev)
 		}
 
 		debug("success\n");
-		break;
+		return 0;
 	}
 
-	return 0;
+	return -ETIMEDOUT;
 }
 
 int atsha204a_idle(struct udevice *dev)
-- 
2.34.1



More information about the U-Boot mailing list