platform/chrome: cros_ec_sensorhub: Retries when a sensor is not ready
authorGwendal Grignou <gwendal@chromium.org>
Mon, 23 Jun 2025 21:05:18 +0000 (14:05 -0700)
committerTzung-Bi Shih <tzungbi@kernel.org>
Tue, 24 Jun 2025 02:49:28 +0000 (02:49 +0000)
commit981d7f91aeda17424b29f033249f4fa7cd2a7556
tree509aca983656145642c76abe77fdd86808dd40a7
parent545daf90910ec83e167cf3fbcc31fcf5467432b8
platform/chrome: cros_ec_sensorhub: Retries when a sensor is not ready

When the EC/ISH starts, it can take a while for all the sensors to be up
and running or declared broken.

If the sensor stack return -EBUSY when checking for sensor information,
retry up to 50 times.
It has been observed 100ms wait time is enough to have valid sensors
ready. It can take more time in case a sensor is really broken and is
not coming up.

Signed-off-by: Gwendal Grignou <gwendal@google.com>
Link: https://lore.kernel.org/r/20250623210518.306740-1-gwendal@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/cros_ec_sensorhub.c