mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
9b67ffcd52
commit
bf4e1db093
@@ -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
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -90,16 +90,6 @@ struct accelgyro_drv {
|
||||
int16_t *temp);
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user