Re: Problem about Read Multiple Raw Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 26 Nov 2019 12:56:11 +0000
Oezguen Guenyeli <oezguen.guenyeli.wg@xxxxxxxxxxx> wrote:

> Hi, 
> I am developing Linux iio driver for one sensor and sensor provides 15 measurement samples that have to been sent the user-space for high level algorithm. 
> I can read data from dev/iio:device and I can apply high-level algorithm. However, I have problem about read_raw_multi function. Max_len pass value as INDIO_MAX_RAW_ELEMENTS in iio_read_channel_info function that locates in industrialio-core.c file and INDIO_MAX_RAW_ELEMENTS is defined 4 in iio.h file.
> Is there any specific reason to define 4 ? Because in that way I cannot pass 15 values to user space with read_raw_multi function. 

Yes.

The intent is that read_raw multi is used for well defined types.  The
largest of those that has been defined in the IIO ABI is quaternions, which
have 4 elements, hence the limit.

There is little point in using IIO for a device such as the one you describe as
no generic userspace code is ever going to work with it.

If you have a series of values that are separate well defined channels, but need
to sample them in one go, then use the buffered interface and read them via
a chardev.  If not and there is a good reason why these 15 numbers represent
one 'thing' then pitch the new userspace ABI and we can consider changing
that limit.

Thanks,

Jonathan

> 
> Thanks, 
> 
> Özgün Kemal Günyeli
> 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux