]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: chromeos_laptop - Add a limit for deferred retries
authorBenson Leung <bleung@chromium.org>
Wed, 16 Jul 2014 00:43:11 +0000 (17:43 -0700)
committerOlof Johansson <olof@lixom.net>
Wed, 16 Jul 2014 01:02:01 +0000 (18:02 -0700)
commite81615201ce278a29b609dc5f31a4ef74eba9c2a
treeda09e9c88c6b6f716c01cd72e457912a9aec20f6
parentb411301e2867da7f5069cb99505282ad6909bfd6
platform/chrome: chromeos_laptop - Add a limit for deferred retries

Limit the number of times we allow deferred probing to attempt to add
i2c devices. This will help with some device flakiness at probe time.
For example, some touchpads and touchscreens may be in transition between
bootloader and operational mode and may appear at neither address briefly.

Adapters, however, have no limit as it depends on when the i2c adapter driver
module is loaded. The module may even be loaded manually by the user using
modprobe or insmod.

By default, set MAX_I2C_DEVICE_DEFERALS to 5.

Based on this patch from the chromeos-kernel :
https://chromium-review.googlesource.com/168130

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
drivers/platform/chrome/chromeos_laptop.c