summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2016-11-04 17:00:47 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-11-08 17:12:18 -0800
commitbf4e1db093d7051491001e59195d30a915785066 (patch)
tree111645b40e13ce791e52a689bec141a01898924e
parent9b67ffcd527c6244a9f1946072f40e8e9fd9b940 (diff)
downloadchrome-ec-bf4e1db093d7051491001e59195d30a915785066.tar.gz
driver: sensor: Remove set_interrupt
Remove set_interrupt(), was always a noop. Unused, interrupt is done inside the init routine. BUG=none BRANCH=none TEST=buildall Change-Id: I0ff4843212ea8140be41dcd17af130991117e3da Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/407968 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--driver/accelgyro_bmi160.c8
-rw-r--r--driver/accelgyro_lsm6ds0.c12
-rw-r--r--driver/als_si114x.c8
-rw-r--r--driver/gyro_l3gd20h.c12
-rw-r--r--include/accelgyro.h10
5 files changed, 0 insertions, 50 deletions
diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c
index 56d484101a..da94b301eb 100644
--- a/driver/accelgyro_bmi160.c
+++ b/driver/accelgyro_bmi160.c
@@ -881,13 +881,6 @@ static int irq_handler(struct motion_sensor_t *s, uint32_t *event)
*/
return EC_SUCCESS;
}
-
-static int set_interrupt(const struct motion_sensor_t *s,
- unsigned int threshold)
-{
- /* Currently unsupported. */
- return EC_ERROR_UNKNOWN;
-}
#endif /* CONFIG_ACCEL_INTERRUPTS */
#ifdef CONFIG_ACCEL_FIFO
@@ -1238,7 +1231,6 @@ const struct accelgyro_drv bmi160_drv = {
.get_offset = get_offset,
.perform_calib = perform_calib,
#ifdef CONFIG_ACCEL_INTERRUPTS
- .set_interrupt = set_interrupt,
.irq_handler = irq_handler,
#endif
#ifdef CONFIG_ACCEL_FIFO
diff --git a/driver/accelgyro_lsm6ds0.c b/driver/accelgyro_lsm6ds0.c
index 7948e651ce..a3a0e5e366 100644
--- a/driver/accelgyro_lsm6ds0.c
+++ b/driver/accelgyro_lsm6ds0.c
@@ -307,15 +307,6 @@ static int get_offset(const struct motion_sensor_t *s,
return EC_SUCCESS;
}
-#ifdef CONFIG_ACCEL_INTERRUPTS
-static int set_interrupt(const struct motion_sensor_t *s,
- unsigned int threshold)
-{
- /* Currently unsupported. */
- return EC_ERROR_UNKNOWN;
-}
-#endif
-
static int is_data_ready(const struct motion_sensor_t *s, int *ready)
{
int ret, tmp;
@@ -457,7 +448,4 @@ const struct accelgyro_drv lsm6ds0_drv = {
.set_offset = set_offset,
.get_offset = get_offset,
.perform_calib = NULL,
-#ifdef CONFIG_ACCEL_INTERRUPTS
- .set_interrupt = set_interrupt,
-#endif
};
diff --git a/driver/als_si114x.c b/driver/als_si114x.c
index 9d9b87006c..c4e31ffd76 100644
--- a/driver/als_si114x.c
+++ b/driver/als_si114x.c
@@ -519,13 +519,6 @@ static int get_offset(const struct motion_sensor_t *s,
return EC_SUCCESS;
}
-static int set_interrupt(const struct motion_sensor_t *s,
- unsigned int threshold)
-{
- /* Currently unsupported. */
- return EC_ERROR_UNKNOWN;
-}
-
static int init(const struct motion_sensor_t *s)
{
int ret, resol;
@@ -575,7 +568,6 @@ const struct accelgyro_drv si114x_drv = {
.get_offset = get_offset,
.perform_calib = NULL,
#ifdef CONFIG_ACCEL_INTERRUPTS
- .set_interrupt = set_interrupt,
.irq_handler = irq_handler,
#endif
#ifdef CONFIG_ACCEL_FIFO
diff --git a/driver/gyro_l3gd20h.c b/driver/gyro_l3gd20h.c
index 0986080285..5555463097 100644
--- a/driver/gyro_l3gd20h.c
+++ b/driver/gyro_l3gd20h.c
@@ -302,15 +302,6 @@ static int get_offset(const struct motion_sensor_t *s,
return EC_SUCCESS;
}
-#ifdef CONFIG_ACCEL_INTERRUPTS
-static int set_interrupt(const struct motion_sensor_t *s,
- unsigned int threshold)
-{
- /* Currently unsupported. */
- return EC_ERROR_UNKNOWN;
-}
-#endif
-
static int is_data_ready(const struct motion_sensor_t *s, int *ready)
{
int ret, tmp;
@@ -432,7 +423,4 @@ const struct accelgyro_drv l3gd20h_drv = {
.set_offset = set_offset,
.get_offset = get_offset,
.perform_calib = NULL,
-#ifdef CONFIG_ACCEL_INTERRUPTS
- .set_interrupt = set_interrupt,
-#endif
};
diff --git a/include/accelgyro.h b/include/accelgyro.h
index 699fcda6df..0432a0e896 100644
--- a/include/accelgyro.h
+++ b/include/accelgyro.h
@@ -91,16 +91,6 @@ struct accelgyro_drv {
int (*perform_calib)(const struct motion_sensor_t *s);
#ifdef CONFIG_ACCEL_INTERRUPTS
/**
- * Setup a one-time accel interrupt. If the threshold is low enough, the
- * interrupt may trigger due simply to noise and not any real motion.
- * If the threshold is 0, the interrupt will fire immediately.
- * @s Pointer to sensor data.
- * @threshold Threshold for interrupt in units of counts.
- */
- int (*set_interrupt)(const struct motion_sensor_t *s,
- unsigned int threshold);
-
- /**
* handler for interrupts triggered by the sensor: it runs in task and
* process the events that triggered an interrupt.
* @s Pointer to sensor data.