platform/chrome: cros_ec_proto: return -EAGAIN when retries timed out
authorTzung-Bi Shih <tzungbi@kernel.org>
Mon, 18 Jul 2022 05:09:12 +0000 (05:09 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 20 Jul 2022 01:22:58 +0000 (01:22 +0000)
commit7f95d2b68b9a4f6624438f2d7dbad01c157b92a6
tree3862dc2c8e6f1bc755f4ef8ea2e9e6ccf5daea35
parent00eb36d528729692d418e53c832971a798f85ceb
platform/chrome: cros_ec_proto: return -EAGAIN when retries timed out

While EC_COMMS_STATUS_PROCESSING flag is still on after it tries
EC_COMMAND_RETRIES times for sending EC_CMD_GET_COMMS_STATUS,
cros_ec_wait_until_complete() doesn't return an error code.

Return -EAGAIN in the case instead.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220718050914.2267370-9-tzungbi@kernel.org
drivers/platform/chrome/cros_ec_proto.c