[PATCH v5 0/3] iio: accel: sca3000: simplify by using newer infrastructure

From: Andrew Ijano
Date: Wed Jun 11 2025 - 15:48:05 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>
---
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 (3):
iio: accel: sca3000: replace error_ret labels by simple returns
iio: accel: sca3000: replace usages of internal read data helpers by
spi helpers
iio: accel: sca3000: use guard(mutex)() for handling mutex lock

drivers/iio/accel/sca3000.c | 366 +++++++++++++-----------------------
1 file changed, 133 insertions(+), 233 deletions(-)

--
2.49.0