mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
iio: accel: bma400: Rename activity_event_en() to generic_event_en()
The function activity_event_en() configures the generic interrupts GEN1 and GEN2, which are used for activity and inactivity detection as per the datasheet. The existing name is misleading, since the device also provides activity change and activity recognition interrupts. Activity change interrupt is not supported yet whereas Activity recognition interrupt is configured in a different function. Rename activity_event_en() to generic_event_en() to better reflect its actual purpose. No functional changes intended. Signed-off-by: Akshay Jindal <akshayaj.lkd@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
1a7a6c5db6
commit
31f3af6283
|
|
@ -1190,9 +1190,9 @@ static int bma400_steps_event_enable(struct bma400_data *data, int state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int bma400_activity_event_en(struct bma400_data *data,
|
||||
enum iio_event_direction dir,
|
||||
int state)
|
||||
static int bma400_generic_event_en(struct bma400_data *data,
|
||||
enum iio_event_direction dir,
|
||||
int state)
|
||||
{
|
||||
int ret;
|
||||
unsigned int intrmask, regval;
|
||||
|
|
@ -1337,7 +1337,7 @@ static int bma400_write_event_config(struct iio_dev *indio_dev,
|
|||
switch (type) {
|
||||
case IIO_EV_TYPE_MAG:
|
||||
mutex_lock(&data->mutex);
|
||||
ret = bma400_activity_event_en(data, dir, state);
|
||||
ret = bma400_generic_event_en(data, dir, state);
|
||||
mutex_unlock(&data->mutex);
|
||||
return ret;
|
||||
case IIO_EV_TYPE_GESTURE:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user