iio: accel: adxl345: Simplify adxl345_read_raw()
authorBiju Das <biju.das.jz@bp.renesas.com>
Sun, 3 Sep 2023 09:00:51 +0000 (10:00 +0100)
committerJonathan Cameron <jonathan.cameron@huawei.com>
Tue, 12 Sep 2023 09:42:04 +0000 (10:42 +0100)
commitdcc3ac1381eff05e4ab546a42798dd6837b295a7
tree5ae9f4cb9a7e770f0ae45f40b6ad99aeeb80e838
parent7d0ba6dbf8356d20b69cfd042800d5d51ac00bd7
iio: accel: adxl345: Simplify adxl345_read_raw()

Simplify adxl345_read_raw() by adding uscale variable to
struct adxl345_chip_info. Also convert variables adxl3{4,7}5_uscale to
macros and use it in OF/ACPI/ID match table.

Drop enum adxl345_device_type as there is no user.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230903090051.39274-3-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl345.h
drivers/iio/accel/adxl345_core.c
drivers/iio/accel/adxl345_i2c.c
drivers/iio/accel/adxl345_spi.c