linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Oezguen Guenyeli <oezguen.guenyeli.wg@renesas.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: Problem about Read Multiple Raw Function
Date: Tue, 26 Nov 2019 15:16:21 +0000	[thread overview]
Message-ID: <20191126151621.0000687c@Huawei.com> (raw)
In-Reply-To: <OSBPR01MB2326981343F90B11AB6CA23DB1450@OSBPR01MB2326.jpnprd01.prod.outlook.com>

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
> 



      reply	other threads:[~2019-11-26 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 12:56 Problem about Read Multiple Raw Function Oezguen Guenyeli
2019-11-26 15:16 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191126151621.0000687c@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=oezguen.guenyeli.wg@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).