Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v3 0/5] iio: accel: bma400: Refactor GENINTR config and register macros
@ 2025-10-02 18:41 Akshay Jindal
  2025-10-02 18:41 ` [PATCH v3 1/5] iio: accel: bma400: Reorganize and rename register and field macros Akshay Jindal
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Akshay Jindal @ 2025-10-02 18:41 UTC (permalink / raw)
  To: dan, jic23, dlechner, nuno.sa, andy
  Cc: Akshay Jindal, shuah, linux-iio, linux-kernel

This series refactors the BMA400 driver with a focus on generic interrupt
configuration and related register usage. The main changes reduce
usage of hard-coded values by introducing macros and formula-based
register addressing, and add a centralized lookup indexed on iio event
direction.

Alongside these updates, the series also reorganizes and renames register
and field macros for consistency with the datasheet, and extends comments
for additional clarity.

All patches are pure refactoring. No functional changes are intended.

Akshay Jindal (5):
  iio: accel: bma400: Reorganize and rename register and field macros
  iio: accel: bma400: Use macros for generic event configuration values
  iio: accel: bma400: Use index-based register addressing and lookup
  iio: accel: bma400: Rename activity_event_en() to generic_event_en()
  iio: accel: bma400: Add detail to comments in GEN INTR configuration

Changes since v2:
- Split single patch into five smaller patches as suggested
- Addressed review comments related to trailing comma [Patch 2/5]
- Extended renaming of macros to TAP_CONFIG registers [Patch 1/5]
- Addressed review comment received regarding write then replace in
  activity_event_en() [Patch 3/5]

Testing Summary:
- Tested on raspberrypi 4b and 7-semi bma400 sensor breakout board.
- Since no functional impact is there, so before functionality is
  expected to be equal to after change functionality.
- Tested mapping of GEN1 and GEN2 both on INT1 pin as before.
- Tested both activity and inactivity detection by setting attributes
  events/in_accel_mag_falling_en as well as events/in_accel_mag_rising_en.
- Did read and writes on various attributes such that write_event_config(),
  write_event_value() and read_event_value() callbacks are triggered.

 drivers/iio/accel/bma400.h      | 151 ++++++++------
 drivers/iio/accel/bma400_core.c | 345 ++++++++++++++++++--------------
 2 files changed, 286 insertions(+), 210 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-10-12 14:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-02 18:41 [PATCH v3 0/5] iio: accel: bma400: Refactor GENINTR config and register macros Akshay Jindal
2025-10-02 18:41 ` [PATCH v3 1/5] iio: accel: bma400: Reorganize and rename register and field macros Akshay Jindal
2025-10-04 12:53   ` Jonathan Cameron
2025-10-07  6:39     ` Akshay Jindal
2025-10-12 14:02       ` Jonathan Cameron
2025-10-02 18:41 ` [PATCH v3 2/5] iio: accel: bma400: Use macros for generic event configuration values Akshay Jindal
2025-10-04 12:58   ` Jonathan Cameron
2025-10-07  6:46     ` Akshay Jindal
2025-10-12 14:04       ` Jonathan Cameron
2025-10-02 18:41 ` [PATCH v3 3/5] iio: accel: bma400: Use index-based register addressing and lookup Akshay Jindal
2025-10-04 13:08   ` Jonathan Cameron
2025-10-07  6:45     ` Akshay Jindal
2025-10-02 18:41 ` [PATCH v3 4/5] iio: accel: bma400: Rename activity_event_en() to generic_event_en() Akshay Jindal
2025-10-02 18:41 ` [PATCH v3 5/5] iio: accel: bma400: Add detail to comments in GEN INTR configuration Akshay Jindal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox