zephyr/drivers/sensor/fxas21002
Diego Sueiro 72cad66c5b drivers/sensor/fxas21002: Fix race condition during initialization
A race condition was identified during the initialization of the
driver when the trigger function is enabled. This exposed two issues:

1 - The fxas21002_handle_int is trying to acquire the semaphore before
    it gets initialized. To solve this we need to initialize the
    semaphore before calling the fxas21002_trigger_init function.

2 - During the fxas21002_trigger initialization the i2c bus is used
    (from fxas21002_handle_int function) at the same time as the
    fxas21002_set_power is being called. To fix this we need to
    initialize the semaphore with 0 and just release it after calling
    the fxas21002_set_power function in the fxas21002_int

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-08-13 09:05:54 -05:00
..
CMakeLists.txt
Kconfig drivers: sensor: Kconfig: Remove redundant 'default n' properties 2018-06-27 17:20:10 -05:00
fxas21002.c drivers/sensor/fxas21002: Fix race condition during initialization 2018-08-13 09:05:54 -05:00
fxas21002.h
fxas21002_trigger.c