From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>,
Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
Denis Ciocca <denis.ciocca@st.com>
Subject: Re: [PATCH] iio: st_common: use standard trigger suffix
Date: Sun, 20 Sep 2015 11:58:18 +0100 [thread overview]
Message-ID: <55FE914A.1090908@kernel.org> (raw)
In-Reply-To: <CACRpkdauLeQbVpOiN3G6dttRKrhV4yyu_K-how-hHHXjSQN9dA@mail.gmail.com>
On 06/08/15 16:03, Linus Walleij wrote:
> On Wed, Aug 5, 2015 at 10:15 PM, Jonathan Cameron
> <jic23@jic23.retrosnub.co.uk> wrote:
>> On 5 August 2015 10:28:15 BST, Linus Walleij <linus.walleij@linaro.org> wrote:
>>>
>>> The triggers from ST sensors are named <iio_device_name>-trigger
>>> instead of the standard <iio_device_name>-dev<iio_dev_id> as
>>> used by most and also in the iio-tools. Change this to match
>>> the norm.
>>>
>>> After this I can do tests with generic_buffer -n <dev_name>
>>> without having to manually specify the trigger with the -t
>>> option.
>>
>> Hmm ABI change... Not a requirement that this naming be followed...
>
> Unless someone can provide a userspace that actually have the
> ST sensors working (with mainline) I think we can make this change.
>
> I've really struggled to get generic_buffer going with the ST sensors
> to no avail. Right now it seems to be because the *_en files in
> /scan_elements are not ever written with "1" so consequently
> iio_buffer_store_enable
> __iio_update_buffers
> iio_buffer_request_update
> iio_buffer_update_bytes_per_datum
>
> Doesn't happen and bytes per datum is zero and it bails out.
>
> I don't know if it's a problem with generic_buffer though, is there
> another userspace that everyone is using without telling me?
>
>> Could register the trigger twice I suppose so as to keep old name available....
>
> Hm there are a couple of more actually using -trigger if there is a
> single one.
>
> Maybe we should have generic_buffer looking for both rather, or
> do you want to keep that tool simple?
>
sorry Linus, I completely failed to come back to you on this.
I'd have no problem with generic-buffer looking for both as long
as the code is commented to say the 'unusual' one is not
the preferred choice and is for legacy parts.
I guess we also need some documentation to specify preferred naming
of triggers. As Lars pointed out the various libraries out there
tend to deal with these cases anyway (often by navigating the sysfs
tree to find associated triggers provided by a given device).
Jonathan
prev parent reply other threads:[~2015-09-20 10:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 9:28 [PATCH] iio: st_common: use standard trigger suffix Linus Walleij
2015-08-05 20:15 ` Jonathan Cameron
2015-08-06 15:03 ` Linus Walleij
2015-08-06 16:39 ` Jonathan Cameron
2015-08-06 18:59 ` Lars-Peter Clausen
2015-09-20 10:58 ` 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=55FE914A.1090908@kernel.org \
--to=jic23@kernel.org \
--cc=denis.ciocca@st.com \
--cc=jic23@jic23.retrosnub.co.uk \
--cc=linus.walleij@linaro.org \
--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;
as well as URLs for NNTP newsgroup(s).