Re: [PATCH] staging: iio: trigger: Use standard attr for sampling frequency

From: Daniel Baluta
Date: Thu Mar 12 2015 - 08:49:00 EST

On Thu, Mar 12, 2015 at 10:40 AM, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> On 03/12/2015 09:16 AM, Octavian Purdila wrote:
>> On Wed, Mar 11, 2015 at 6:36 PM, Daniel Baluta <daniel.baluta@xxxxxxxxx>
>> wrote:
>>> As written in Documentation/ABI/testing/sysfs-bus-iio the trigger
>>> attribute for sampling frequency should be sampling_frequency.
>>> Fix this for iio-trig-periodic-rtc module in order to prepare it
>>> for moving out of staging.
>>> Signed-off-by: Daniel Baluta <daniel.baluta@xxxxxxxxx>
>>> ---
>>> Jonathan, this module is very useful for devices that do not have
>>> an interrupt pin.
>>> We are working on drivers for such devices and would be very nice to
>>> move this driver in advance to the IIO non-staging location.
>>> What do you say?
>> Hmm, I wonder what are the advantages of using RTC timers. Couldn't we
>> use a regular kernel timer instead?
> The long term plan is to get rid of the RTC timer trigger due to its various
> limitations (poor resolution, etc).
> There is the hrtimer trigger
> (
> but we haven't agreed on a proper interface yet how to instantiate the
> hrtimer trigger.
> Check the ml archive for the various discussions on it:

Hi Lars,

That was an interesting reading. There were people trying to push
hrtimer based IIO trigger 4 years ago :).

I think it's now the time to have this upstream.

I will be back :) (as many others said before) with an RFC patch.

I think we should keep the following requirements:

1) Create a common framework for software based triggers.
2) User space driven configuration for trigger instances,
as opposed to platform device files used for RTC based trigger
3) Remove RTC interrupt source, use hrtimers instead

Still not clear, but I will trying to figure it out during implementation:

4) configfs vs sysfs interface.

At the first glance, I would say we should stay with sysfs interface in order
to avoid another dependency. But let's see how it works.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at