lkml.org 
[lkml]   [2024]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/6] iio: pressure: add SCALE and RAW values for channels
On Wed, Mar 13, 2024 at 06:40:04PM +0100, Vasileios Amoiridis wrote:
> Add extra IIO_CHAN_INFO_SCALE and IIO_CHAN_INFO_RAW in order to be
> able to calculate the processed value with standard userspace IIO
> tools. Can be used for triggered buffers as well.

..

> + case IIO_CHAN_INFO_RAW:
> + switch (chan->type) {
> + case IIO_HUMIDITYRELATIVE:
> + *val = data->chip_info->read_humid(data);
> + ret = IIO_VAL_INT;
> + break;
> + case IIO_PRESSURE:
> + *val = data->chip_info->read_press(data);
> + ret = IIO_VAL_INT;
> + break;
> + case IIO_TEMP:
> + *val = data->chip_info->read_temp(data);
> + ret = IIO_VAL_INT;
> + break;
> + default:
> + ret = -EINVAL;
> + break;

Is it mutex that prevents us from returning here?
If so, perhaps switching to use cleanup.h first?

> + }
> + break;


--
With Best Regards,
Andy Shevchenko



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