diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2017-02-22 13:00:15 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-01 11:19:35 -0800 |
commit | 9af60bb7955a8bba0710798d1dcf2a4d2c2aae6b (patch) | |
tree | 4725fe5d3505378a1a26cf6e47f45a4af378db01 /driver | |
parent | eb85cc2101ffccce6f54168782afac797f764202 (diff) | |
download | chrome-ec-9af60bb7955a8bba0710798d1dcf2a4d2c2aae6b.tar.gz |
driver: kionix: Forgive i2c read failures while the acc is resetting
Port changes cl/288874 to generic kionix driver.
From cl/288874:
After we write SRST in CTRL2, there seems to be a period of time where the
accelerometer doesn't respond to i2c commmands. Instead of failing the init
just consider it as part of the timeout period.
BUG=chrome-os-partner:39269,chrome-os-partner:63146
TEST=make -j buildall
BRANCH=veyron,cave
Reviewed-on: https://chromium-review.googlesource.com/445973
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit 4a34b0d88f6b0075ee66a18f4aa22325dc766eb6)
Change-Id: I2197aa7741d1482b76c7c07b0cb0c171aab86a59
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/446417
Diffstat (limited to 'driver')
-rw-r--r-- | driver/accel_kionix.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/driver/accel_kionix.c b/driver/accel_kionix.c index 980ccbe81a..de03120404 100644 --- a/driver/accel_kionix.c +++ b/driver/accel_kionix.c @@ -501,11 +501,6 @@ static int init(const struct motion_sensor_t *s) msleep(1); ret = raw_read8(s->port, s->addr, reg, &val); - if (ret != EC_SUCCESS) { - mutex_unlock(s->mutex); - return ret; - } - /* Reset complete. */ if ((ret == EC_SUCCESS) && !(val & reset_field)) break; |