![Jonathan Cameron](/assets/img/avatar_default.png)
This patch is in response to that of Gregor Boirie <gregor.boirie@parrot.com> who proposed using a tight kthread within a device driver (be it with the support factored out into a helper library) in order to basically spin as fast as possible. It is meant as a talking point rather than a formal proposal of the code (though we are heading towards that I think). Also gives people some working code to mess around with. I proposed that this could be done with a trigger with a few constraints and this is the proof (be it ugly) of that. There are some constraints though, some of which we would want to relax if this were to move forward. * Will only run the thread part of the registered pollfunc. This is to avoid the overhead of jumping in and out of interrupt context. Is the overhead significant? Not certain but feels like it should be! * This limitation precludes any device that 'must' do some work in interrupt context. However, that is true of few if any drivers and I suspect that any that do will be restricted to using triggers they provide themselves. Usually we have a top half mainly to grab a timestamp as soon after the dataready type signal as possible. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Daniel Baluta <daniel.baluta@intel.com>
51 lines
1.5 KiB
Plaintext
51 lines
1.5 KiB
Plaintext
#
|
|
# Industrial I/O standalone triggers
|
|
#
|
|
# When adding new entries keep the list in alphabetical order
|
|
|
|
menu "Triggers - standalone"
|
|
|
|
config IIO_HRTIMER_TRIGGER
|
|
tristate "High resolution timer trigger"
|
|
depends on IIO_SW_TRIGGER
|
|
help
|
|
Provides a frequency based IIO trigger using high resolution
|
|
timers as interrupt source.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called iio-trig-hrtimer.
|
|
|
|
config IIO_INTERRUPT_TRIGGER
|
|
tristate "Generic interrupt trigger"
|
|
help
|
|
Provides support for using an interrupt of any type as an IIO
|
|
trigger. This may be provided by a gpio driver for example.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called iio-trig-interrupt.
|
|
|
|
config IIO_TIGHTLOOP_TRIGGER
|
|
tristate "A kthread based hammering loop trigger"
|
|
depends on IIO_SW_TRIGGER
|
|
help
|
|
An experimental trigger, used to allow sensors to be sampled as fast
|
|
as possible under the limitations of whatever else is going on.
|
|
Uses a tight loop in a kthread. Will only work with lower half only
|
|
trigger consumers.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called iio-trig-loop.
|
|
|
|
config IIO_SYSFS_TRIGGER
|
|
tristate "SYSFS trigger"
|
|
depends on SYSFS
|
|
select IRQ_WORK
|
|
help
|
|
Provides support for using SYSFS entries as IIO triggers.
|
|
If unsure, say N (but it's safe to say "Y").
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called iio-trig-sysfs.
|
|
|
|
endmenu
|