From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
Cc: Bastien Nocera <hadess@hadess.net>,
Jonathan Cameron <jic23@kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Reyad Attiyat <reyad.attiyat@gmail.com>,
linux-iio@vger.kernel.org,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Subject: Re: User-space API for accelerometer(s)?
Date: Thu, 03 Jul 2014 19:58:52 +0200 [thread overview]
Message-ID: <53B599DC.1040705@metafoo.de> (raw)
In-Reply-To: <53B59837.8080907@jic23.retrosnub.co.uk>
On 07/03/2014 07:51 PM, Jonathan Cameron wrote:
> On 01/07/14 13:10, Bastien Nocera wrote:
>> Hey again Jonathan,
>>
>> On Sat, 2014-06-21 at 13:01 +0100, Jonathan Cameron wrote:
>> <snip>
>>> Just to throw it in there. There is an out of tree bridge driver from
>>> IIO to input. It's only out of tree because I haven't had a chance to
>>> tidy it up (anyone else is welcome to take this on if they like!)
>>> Google for iio_input.c to find it.
>>>
>>> The intent of that was to allow general accelerometer drivers and similar
>>> in IIO to work in conjunction with iio-input to provide input style interfaces.
>>> This came about after previous debates on where the 'right' place for
>>> accelerometers was in the kernel. I believe that at least in principle,
>>> Dmitry was happy with this concept.
>>
>> After updating forward-porting the driver so that it runs on a more
>> recent version of the kernel, I tried to get it running.
>>
>> I'm guessing that you expected the iio_input driver to be instantiated
>> by a board specific file. Is there any way to have it generically try
>> out all the IIO devices, similarly to pci_register_driver()? Or should I
>> do that in the hid-sensor-accel driver?
> At the moment we only have support to instantiate it via such a board specific
> file. We probably want to be a little careful about how to add more generic
> means for creating such bindings..
>
> Simply generically trying all IIO drivers isn't the way to go as there is
> no obvious way of deciding what it makes sense to bind to on a given machine.
>
> Perhaps something closer to the way you can instantiate i2c devices from
> userspace, or perhaps we need to consider something else such as configfs for
> creating such bindings... (cc'd Lars for comments on whether that makes sense...)
Yes, configfs is what came to my mind after reading the first few lines of
Bastien's mail. Exposing a IIO device as something other than a IIO device is a
policy decision. And policy decisions should preferably be made by userspace.
But yea, we have to be careful with the ABI.
- Lars
next prev parent reply other threads:[~2014-07-03 18:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 14:09 User-space API for accelerometer(s)? Bastien Nocera
2014-06-18 23:31 ` Reyad Attiyat
2014-06-18 23:45 ` Srinivas Pandruvada
2014-06-19 11:20 ` Bastien Nocera
2014-06-21 12:01 ` Jonathan Cameron
2014-06-21 12:37 ` Bastien Nocera
2014-06-21 16:26 ` Srinivas Pandruvada
2014-07-01 12:10 ` Bastien Nocera
2014-07-03 17:51 ` Jonathan Cameron
2014-07-03 17:58 ` Lars-Peter Clausen [this message]
2014-07-04 9:35 ` Bastien Nocera
2014-07-09 14:33 ` Bastien Nocera
2014-07-09 14:54 ` Peter Meerwald
2014-07-09 22:16 ` Bastien Nocera
2014-07-10 1:38 ` Peter F. Patel-Schneider
2014-07-10 15:04 ` Srinivas Pandruvada
2014-07-23 12:19 ` Bastien Nocera
2014-07-23 13:02 ` Srinivas Pandruvada
2014-07-23 16:51 ` Bastien Nocera
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=53B599DC.1040705@metafoo.de \
--to=lars@metafoo.de \
--cc=benjamin.tissoires@redhat.com \
--cc=hadess@hadess.net \
--cc=jic23@jic23.retrosnub.co.uk \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=reyad.attiyat@gmail.com \
--cc=srinivas.pandruvada@linux.intel.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).