Re: [PATCH v3 1/3] iio: mpl3115: use get_unaligned_be24 to retrieve pressure data
From: Andy Shevchenko
Date: Wed Nov 05 2025 - 10:20:59 EST
On Wed, Nov 05, 2025 at 10:56:13AM +0100, Antoni Pokusinski wrote:
> 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.
get_unaligned_be24()
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
independently on the below.
...
> + u8 tmp[3];
While at it, you also may rename it to something better
${foo}_be24;
where ${foo} should be replaced to the meaningful name.
--
With Best Regards,
Andy Shevchenko