[PATCH v6 0/4] iio: accel: sca3000: simplify by using newer infrastructure
From: Andrew Ijano
Date: Tue Jun 17 2025 - 23:17:33 EST
The sca3000 driver is old and could be simplified by using newer
infrastructure.
Signed-off-by: Andrew Ijano <andrew.lopes@xxxxxxxxxxxxx>
Co-developed-by: Gustavo Bastos <gustavobastos@xxxxxx>
Signed-off-by: Gustavo Bastos <gustavobastos@xxxxxx>
Suggested-by: Jonathan Cameron <jic23@xxxxxxxxxx>
---
v5 -> v6:
- break up changes related to read data helpers in two patches
- fix formatting
- add local scope for switch() cases that use guard()
- use sysfs_emit_at() instead of sprintf()
v4 -> v5:
- break up the changes in three patches
- replace error_ret labels by simple returns
- use spi_w8r16be() for be16 reads
- use guard(mutex) for handling mutex lock
v3 -> v4:
- clean the code and remove redundant operations
v2 -> v3:
- replace usages of internal read data helpers by spi helpers
v1 -> v2:
- simplify the return of the internal read data function
---
Andrew Ijano (4):
iio: accel: sca3000: replace usages of internal read data helpers by
spi helpers
iio: accel: sca3000: clean sca3000_read_data()
iio: accel: sca3000: use lock guards
iio: accel: sca3000: use sysfs_emit_at() instead of sprintf()
drivers/iio/accel/sca3000.c | 384 ++++++++++++++----------------------
1 file changed, 145 insertions(+), 239 deletions(-)
--
2.49.0