]> Gentwo Git Trees - linux/.git/commit
iio: mpl3115: use get_unaligned_be24() to retrieve pressure data
authorAntoni Pokusinski <apokusinski01@gmail.com>
Wed, 12 Nov 2025 22:56:59 +0000 (23:56 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 15 Nov 2025 18:06:47 +0000 (18:06 +0000)
commit47e4b1ca441cc4f1d9db13ff5e9b89e53aae0198
tree20b755d6fbcda615dd800fbb9ada84625e45a8c7
parent0de73abe5f5c2b58d66d6dcb7d44df05b0f73684
iio: mpl3115: use get_unaligned_be24() to retrieve pressure data

The pressure measurement result is arranged as 20-bit unsigned value
residing in three 8-bit registers. Hence, it can be retrieved using
get_unaligned_be24() and by applying 4-bit shift.

Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/mpl3115.c