iio: bma220: Use scan_type when processing raw data
authorGwendal Grignou <gwendal@chromium.org>
Thu, 4 Nov 2021 08:24:01 +0000 (01:24 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 17 Nov 2021 17:51:40 +0000 (17:51 +0000)
commitf905772e8b16cde9858b9d775b215757d4d8db27
treecf57fff6267050c0c74dd2ea10548e63bd582513
parent0d376dc9febb78eda0bc3121f66d4e4d868880c0
iio: bma220: Use scan_type when processing raw data

Use channel definition as root of trust and replace constant
when reading elements directly using the raw sysfs attributes.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Link: https://lore.kernel.org/r/20211104082413.3681212-2-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/bma220_spi.c