]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
misc: atsha204a: return timeout from wakeup function
authorAdrian Fiergolski <adrian.fiergolski@fastree3d.com>
Tue, 11 Jan 2022 18:05:29 +0000 (19:05 +0100)
committerHeiko Schocher <hs@denx.de>
Wed, 23 Mar 2022 06:27:37 +0000 (07:27 +0100)
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>
drivers/misc/atsha204a-i2c.c

index 715dabb27992f957c4c268d31f236a4e4a871b12..9d069fb33c92a803ae21b2148d686473b20384e4 100644 (file)
@@ -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)