lkml.org 
[lkml]   [2024]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/6] iio: pressure: Simplify and make more clear temperature readings
On Wed, Mar 13, 2024 at 06:40:05PM +0100, Vasileios Amoiridis wrote:
> The read_press/read_humid functions need the updated t_fine value

read_press()/read_humid()


> in order to calculate the current pressure/humidity. Temperature
> reads should be removed from the read_press/read_humid functions

read_press()/read_humid()

> and should be placed in the oneshot captures before the pressure
> and humidity reads. This makes the code more intuitive.

..

> + if (strcmp(indio_dev->name, "bmp580"))
> + data->chip_info->read_temp(data);
> +

> + if (strcmp(indio_dev->name, "bmp580"))
> + data->chip_info->read_temp(data);

Yeah, not a fan of the strcmp().

--
With Best Regards,
Andy Shevchenko



\
 
 \ /
  Last update: 2024-03-13 20:20    [W:0.115 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site