iio: accel: adxl345: simplify measure enable
authorLothar Rubusch <l.rubusch@gmail.com>
Tue, 10 Jun 2025 21:59:25 +0000 (21:59 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 26 Jun 2025 18:32:55 +0000 (19:32 +0100)
commitf7f905f7a7eca0586b70dfae1ccf48ebe2f6495e
tree4cdedfcc04fe24bc5ae1fa1e18be636ee5d2dedc
parent5decafde4dee2e725b03bc0cd540af35bf199835
iio: accel: adxl345: simplify measure enable

Simplify the function to enable or disable measurement. Replace the
separate decision logic and call to regmap_update_bits() by a single
call to regmap_assign_bits() taking a boolean argument directly.

This is a refactoring change and should not impact functionality.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Link: https://patch.msgid.link/20250610215933.84795-4-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl345.h
drivers/iio/accel/adxl345_core.c