iio: accel: kionix-kx022a: Refactor driver and add chip_info structure
authorMehdi Djait <mehdi.djait.k@gmail.com>
Sat, 16 Sep 2023 12:38:51 +0000 (14:38 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 17 Sep 2023 09:44:31 +0000 (10:44 +0100)
commite7123a4dfcd732c4d10620748588e3715f362802
treeab28f207586b60b78e15e8119893df4e0c51b636
parent13d5398a8eebcb19e3424979658d97fbe1b21891
iio: accel: kionix-kx022a: Refactor driver and add chip_info structure

Add the chip_info structure to the driver's private data to hold all
the device specific infos.
Refactor the kx022a driver implementation to make it more generic and
extensible.

Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com>
Link: https://lore.kernel.org/r/7a31d0cdefba15d7c791252ec8bc5db553b3996b.1694867379.git.mehdi.djait.k@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/kionix-kx022a-i2c.c
drivers/iio/accel/kionix-kx022a-spi.c
drivers/iio/accel/kionix-kx022a.c
drivers/iio/accel/kionix-kx022a.h