]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:02 +0000 (18:41 +0200)
commit2ff6795a5503a05821126a9d1fb376e95c302dd3
treef017c1573a48c1ad7ab8ab4eb1f4f3fae229f60e
parent058bbe6711a151fbb7c14d74b70e7c4688129a8c
platform/chrome: cros_ec_sensorhub: Retries when a sensor is not ready

[ Upstream commit 981d7f91aeda17424b29f033249f4fa7cd2a7556 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/chrome/cros_ec_sensorhub.c