]> git.baikalelectronics.ru Git - kernel.git/commit
staging:iio:cdc:ad7150: Add scale and offset to info_mask_shared_by_type
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Mar 2021 18:15:05 +0000 (18:15 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 7 Apr 2021 07:36:36 +0000 (08:36 +0100)
commit6dff55c5b485b658bb89613c9be0419deee0e794
treede40ad7ab5d0cd93bc5e257da67ca9cd26b78158
parentcd1916f22d943c2b7b8468200b5d3ddd70ea5ec3
staging:iio:cdc:ad7150: Add scale and offset to info_mask_shared_by_type

The datasheet provides these two values on the assumption they are applied
to unshift raw value.  Hence shift both the offset and scale by 4
to compensate.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20210314181511.531414-19-jic23@kernel.org
drivers/staging/iio/cdc/ad7150.c