From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>,
Robert Dolca <robert.dolca@intel.com>,
linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Denis CIOCCA <denis.ciocca@st.com>
Subject: Re: [PATCH RFC 1/3] iio: Add symlink to triggers in the device's trigger folder
Date: Tue, 12 May 2015 18:56:16 +0200 [thread overview]
Message-ID: <555230B0.3050700@metafoo.de> (raw)
In-Reply-To: <554CD236.4000404@kernel.org>
On 05/08/2015 05:11 PM, Jonathan Cameron wrote:
> On 16/04/15 05:01, Robert Dolca wrote:
>> This patch adds a new function called iio_trigger_register_with_dev
>> which is a wrapper for iio_trigger_register. Besides the iio_trigger
>> struct this function requires iio_dev struct. It adds the trigger in
>> the device's trigger list and saves a reference to the device in the
>> trigger's struct.
>>
>> When the device is registered, in the trigger folder of the device
>> (where current_trigger file resides) a symlink is being created for
>> each trigger that was registered width iio_trigger_register_with_dev.
>>
>> # ls -l /sys/bus/iio/devices/iio:device0/trigger/
>> total 0
>> -rw-r--r-- 1 root root 4096 Apr 16 08:33 current_trigger
>> lrwxrwxrwx 1 root root 0 Apr 16 08:33 trigger0 -> ../../trigg
>> er0
>>
>> This should be used for device specific triggers. Doing this the user space
>> applications can figure out what if the trigger registered by a specific device
>> and what should they write in the current_trigger file. Currently some
>> applications rely on the trigger name and this does not always work.
>>
>> This implementation assumes that the trigger is registered before the device is
>> registered. If the order is not this the symlink will not be created but
>> everything else will work as before.
>>
>> Signed-off-by: Robert Dolca <robert.dolca@intel.com>
> I was rather hoping we'd get a few more comments on this.
> In principle I like the idea, but it's new ABI and does make life
> a tiny bit more complex, so what do people think?
>
> Few trivial code comments inline.
I don't think it adds more information. Both the trigger and the device get
registered for the same parent device, so you can already easily find the
trigger for a device by going to the parent device and taking a look at the
triggers registered by the parent device.
next prev parent reply other threads:[~2015-05-12 16:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 9:01 [PATCH RFC 0/3] Add IIO trigger symlink in iio:device0/trigger/ Robert Dolca
2015-04-16 9:01 ` [PATCH RFC 1/3] iio: Add symlink to triggers in the device's trigger folder Robert Dolca
2015-05-08 15:11 ` Jonathan Cameron
2015-05-12 16:56 ` Lars-Peter Clausen [this message]
2015-05-12 19:06 ` Jonathan Cameron
2015-05-13 7:28 ` Lars-Peter Clausen
2015-05-13 17:42 ` Jonathan Cameron
2015-05-13 18:03 ` Robert Dolca
2015-05-13 18:05 ` Lars-Peter Clausen
2015-05-13 18:09 ` Lars-Peter Clausen
2015-05-12 13:44 ` Daniel Baluta
2015-04-16 9:01 ` [PATCH RFC 2/3] iio: Improve iio_trigger_register_with_dev to register trigger after device Robert Dolca
2015-05-12 13:46 ` Daniel Baluta
2015-04-16 9:01 ` [PATCH RFC 3/3] iio: Use with iio_trigger_register_with_dev to register trigger Robert Dolca
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=555230B0.3050700@metafoo.de \
--to=lars@metafoo.de \
--cc=denis.ciocca@st.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=robert.dolca@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