From: Akshay Jindal <akshayaj.lkd@gmail.com>
To: dan@dlrobertson.com, jic23@kernel.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org
Cc: Akshay Jindal <akshayaj.lkd@gmail.com>,
shuah@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v5 5/6] iio: accel: bma400: Rename activity_event_en() to generic_event_en()
Date: Sun, 12 Oct 2025 23:36:12 +0530 [thread overview]
Message-ID: <20251012180619.195244-6-akshayaj.lkd@gmail.com> (raw)
In-Reply-To: <20251012180619.195244-1-akshayaj.lkd@gmail.com>
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>
---
drivers/iio/accel/bma400_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/accel/bma400_core.c b/drivers/iio/accel/bma400_core.c
index cec59d409531..840c4156ba60 100644
--- a/drivers/iio/accel/bma400_core.c
+++ b/drivers/iio/accel/bma400_core.c
@@ -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:
--
2.43.0
next prev parent reply other threads:[~2025-10-12 18:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-12 18:06 [PATCH v5 0/6] iio: accel: bma400: Refactor GENINTR config and register macros Akshay Jindal
2025-10-12 18:06 ` [PATCH v5 1/6] iio: accel: bma400: Reorganize and rename register and field macros Akshay Jindal
2025-10-12 18:06 ` [PATCH v5 2/6] iio: accel: bma400: Use macros for generic event configuration values Akshay Jindal
2025-10-12 18:06 ` [PATCH v5 3/6] iio: accel: bma400: Use index-based register addressing and lookup Akshay Jindal
2025-10-12 18:06 ` [PATCH v5 4/6] iio: accel: bma400: Replace bit shifts with FIELD_PREP() and FIELD_GET() Akshay Jindal
2025-10-12 18:06 ` Akshay Jindal [this message]
2025-10-12 18:06 ` [PATCH v5 6/6] iio: accel: bma400: Add detail to comments in GEN INTR configuration Akshay Jindal
2025-10-18 15:06 ` [PATCH v5 0/6] iio: accel: bma400: Refactor GENINTR config and register macros Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251012180619.195244-6-akshayaj.lkd@gmail.com \
--to=akshayaj.lkd@gmail.com \
--cc=andy@kernel.org \
--cc=dan@dlrobertson.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).