]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: accel: bma400: Rename activity_event_en() to generic_event_en()
authorAkshay Jindal <akshayaj.lkd@gmail.com>
Sun, 12 Oct 2025 18:06:12 +0000 (23:36 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Oct 2025 10:59:23 +0000 (11:59 +0100)
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>
drivers/iio/accel/bma400_core.c

index cec59d4095319a969fbfa9f361051193f45452f5..840c4156ba6042063777c04578b1c568a31cf51b 100644 (file)
@@ -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: