diff options
author | Adrian Fiergolski <adrian.fiergolski@fastree3d.com> | 2022-01-11 19:05:30 +0100 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2022-03-23 07:27:37 +0100 |
commit | e4662716fbbe4ce717cbf9f193564943ffe355f8 (patch) | |
tree | 7c4a62aedcd59b631c6718ab2d2ab844b1ca02ef | |
parent | 75967a24f9a3d86e0c2e9c937400498d47ccc3ef (diff) | |
download | u-boot-e4662716fbbe4ce717cbf9f193564943ffe355f8.zip u-boot-e4662716fbbe4ce717cbf9f193564943ffe355f8.tar.gz u-boot-e4662716fbbe4ce717cbf9f193564943ffe355f8.tar.bz2 |
misc: atsha204a: add delay after sending the message
Once request is sent, and before receiving a response, the delay is required.
This patch fixes missing delay for before first response try.
Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
-rw-r--r-- | drivers/misc/atsha204a-i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index 9d069fb..d264477 100644 --- a/drivers/misc/atsha204a-i2c.c +++ b/drivers/misc/atsha204a-i2c.c @@ -280,6 +280,7 @@ static int atsha204a_transaction(struct udevice *dev, struct atsha204a_req *req, } do { + udelay(ATSHA204A_EXECTIME); res = atsha204a_recv_resp(dev, resp); if (!res || res == -EMSGSIZE || res == -EBADMSG) break; @@ -287,7 +288,6 @@ static int atsha204a_transaction(struct udevice *dev, struct atsha204a_req *req, debug("ATSHA204A transaction polling for response " "(timeout = %d)\n", timeout); - udelay(ATSHA204A_EXECTIME); timeout -= ATSHA204A_EXECTIME; } while (timeout > 0); |