]> git.baikalelectronics.ru Git - kernel.git/commit
iio: mpl3115: Use scan_type.shift and realbit in mpl3115_read_raw
authorGwendal Grignou <gwendal@chromium.org>
Thu, 4 Nov 2021 08:24:13 +0000 (01:24 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 17 Nov 2021 17:51:44 +0000 (17:51 +0000)
commitd7b115c4f8e5d938c6e10a167a062b3bde44c556
tree1951b5a14d2624cf7f084cba532e464d79241f5a
parent0014569bec0e90cf01c33e90e92ab372442bcc21
iio: mpl3115: Use scan_type.shift and realbit in mpl3115_read_raw

When processing raw data using channel scan_type.shift as source of
trust to shift data appropriately.
When processing the temperature channel, use a 16bit big endian variable
as buffer to increase conversion readability.

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