iio: accel: adxl345: simplify interrupt mapping
authorLothar Rubusch <l.rubusch@gmail.com>
Wed, 2 Jul 2025 23:03:08 +0000 (23:03 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 14 Jul 2025 18:20:50 +0000 (19:20 +0100)
commit7a7242d86231f489476653b3d7baf020cab3d786
tree454203a7b59918fd3f7bae447078329452625e3e
parent0755fd550cde901923203dabd75e3f4de08bc9dc
iio: accel: adxl345: simplify interrupt mapping

Refactor the sensor interrupt mapping by utilizing regmap_assign_bits(),
which accepts a boolean value directly. Introduce a helper function to
streamline the identification of the configured interrupt line pin. Also,
use identifiers from units.h to represent the full 8-bit register when
setting bits.

This is a purely refactoring change and does not affect functionality.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250702230315.19297-2-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl345_core.c