linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem about Read Multiple Raw Function
@ 2019-11-26 12:56 Oezguen Guenyeli
  2019-11-26 15:16 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Oezguen Guenyeli @ 2019-11-26 12:56 UTC (permalink / raw)
  To: linux-iio

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. 

Thanks, 

Özgün Kemal Günyeli


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem about Read Multiple Raw Function
  2019-11-26 12:56 Problem about Read Multiple Raw Function Oezguen Guenyeli
@ 2019-11-26 15:16 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-11-26 15:16 UTC (permalink / raw)
  To: Oezguen Guenyeli; +Cc: linux-iio

On Tue, 26 Nov 2019 12:56:11 +0000
Oezguen Guenyeli <oezguen.guenyeli.wg@renesas.com> 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
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-26 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 12:56 Problem about Read Multiple Raw Function Oezguen Guenyeli
2019-11-26 15:16 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).