public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Bastien Nocera <hadess@hadess.net>
Cc: linux-iio@vger.kernel.org
Subject: Re: Kernel wishlist item: Better IIO API
Date: Wed, 29 Oct 2014 18:39:12 +0100	[thread overview]
Message-ID: <54512640.3040505@metafoo.de> (raw)
In-Reply-To: <1414604035.2406.41.camel@hadess.net>

On 10/29/2014 06:33 PM, Bastien Nocera wrote:
> On Wed, 2014-10-29 at 18:21 +0100, Lars-Peter Clausen wrote:
>> On 10/29/2014 03:30 PM, Bastien Nocera wrote:
>>> Hey,
>>>
>>> I've posted this a couple of days ago:
>>> http://www.hadess.net/2014/10/a-gnome-kernel-wishlist.html
>>> along with a mail to LKML:
>>> http://thread.gmane.org/gmane.linux.kernel/1810083
>>>
>>> I've recently added to my list an item about IIO:
>>> https://wiki.gnome.org/BastienNocera/KernelWishlist
>>>
>>> Are there any plans for a better API for the IIO subsystem? The API
>>> might be good enough to drive from shell scripts, or helpers that only
>>> need to work with one variant of a device, but my attempts at trying to
>>> use the IIO subsystem to provide an accelerometer to do automatic
>>> display rotation[1] showed that the API is really cumbersome.
>>>
>>> The code I wrote spends most of its time creating sysfs paths, reading
>>> values in different formats, and mangling filenames[2].
>>>
>>> Is an ioctl-based API planned? Something where I could get/set
>>> structures to gather metadata about the device, and set it up easily, so
>>> reading data from it is easier?
>>
>> No, unfortunately not and I'm not sure if such a ABI would be accepted if
>> proposed.
>
> Why not?

Because it means there will be ambiguity in the API on how to do things. 
Which is typically not a desired property.

>
>> But checkout libiio[1][2], it hides the details of the sysfs file manipulation.
>
> I'm not sure that's any better unfortunately. I've certainly tried to do
> that already in my code, but that doesn't change that the user-space API
> is barely usable.

It's not completely unusable ;)

- Lars

  reply	other threads:[~2014-10-29 17:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 14:30 Kernel wishlist item: Better IIO API Bastien Nocera
2014-10-29 17:21 ` Lars-Peter Clausen
2014-10-29 17:33   ` Bastien Nocera
2014-10-29 17:39     ` Lars-Peter Clausen [this message]
2014-10-29 17:47       ` Bastien Nocera
2014-10-29 18:30         ` Lars-Peter Clausen
2014-11-03 23:01           ` Bastien Nocera
2014-11-04  7:52             ` Jonathan Cameron
2014-11-04  8:18             ` Daniel Baluta
2014-11-04  8:27               ` Bastien Nocera
2014-11-04  8:37                 ` Daniel Baluta
2014-11-04  8:45                   ` Bastien Nocera
2014-11-04  8:56                     ` Daniel Baluta
2014-11-06 14:55                       ` Bastien Nocera
2014-11-13 20:05           ` Bastien Nocera
2014-11-16 22:12             ` Jonathan Cameron
2014-11-16 22:42               ` Bastien Nocera
2014-11-17 13:34                 ` Jonathan Cameron
2015-03-21 16:08               ` Elad Alfassa

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=54512640.3040505@metafoo.de \
    --to=lars@metafoo.de \
    --cc=hadess@hadess.net \
    --cc=linux-iio@vger.kernel.org \
    /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