misc: atsha204a: return timeout from wakeup function
If the maximum number of wake-up attempts is exceeded, return -ETIMEDOUT.
Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 715dabb..9d069fb 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -240,10 +240,10 @@
}
debug("success\n");
- break;
+ return 0;
}
- return 0;
+ return -ETIMEDOUT;
}
int atsha204a_idle(struct udevice *dev)