summaryrefslogtreecommitdiff
path: root/include/accelgyro.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-09-08 11:34:42 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-19 15:18:08 -0700
commit33046e7d51af5d521235c79dcddc3308c71189db (patch)
tree9dfdd80fcd1c3cc98270e8adac0030ae72a4856b /include/accelgyro.h
parent9d1910f5a0772b06c3c48a5c5f3c3412b0a1b682 (diff)
downloadchrome-ec-33046e7d51af5d521235c79dcddc3308c71189db.tar.gz
common: accel: Add error code for irq handler
When IRQ handler is not processing any event raised, return NOT_HANDLED. Without this change, any event would set the light sensor process timestamp and, if the light sensor frequency was lower than BM160 fifo interrupt frequency, we would never read from the light sensor. BRANCH=smaug BUG=chrome-os-partner:43800 TEST=Compile. Check that light sensor data get updated. Change-Id: I302f80c5cd9b4f3c926362fdafdc8b5074cabb60 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/298686
Diffstat (limited to 'include/accelgyro.h')
-rw-r--r--include/accelgyro.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h
index f9b68f0e36..a941c2fcb9 100644
--- a/include/accelgyro.h
+++ b/include/accelgyro.h
@@ -104,7 +104,10 @@ struct accelgyro_drv {
* handler for interrupts triggered by the sensor: it runs in task and
* process the events that triggered an interrupt.
* @s Pointer to sensor data.
- * @event Event to process. May add add other events for the next processor.
+ * @event Event to process. May add other events for the next processor.
+ *
+ * Return EC_SUCCESS when one event is handled, EC_ERROR_NOT_HANDLED
+ * when no events have been proccessed.
*/
int (*irq_handler)(struct motion_sensor_t *s, uint32_t *event);
#endif