History

iio: Move attach/detach of the poll func to the core

All devices using a triggered buffer need to attach and detach the trigger to the device in order to properly work. Instead of doing this in each and every driver by hand move this into the core. At this point in time, all drivers should have been resolved to attach/detach the poll-function in the same order. This patch removes all explicit calls of iio_triggered_buffer_postenable() & iio_triggered_buffer_predisable() in all drivers, since the core handles now the pollfunc attach/detach. The more peculiar change is for the 'at91-sama5d2_adc' driver, since it's not immediately obvious that removing the hooks doesn't break anything. Eugen was able to test on at91-sama5d2-adc driver, sama5d2-xplained board. All seems to be fine.

Lars-Peter Clausen committed 6 years ago

Commit f11d59d1 parent 044d40649 files · +93 −429Browse files

Showing the changes to include/linux (1 of 49 files). Show all

Unified · Split

include/linux/iio/trigger_consumer.h+0−7
@@ -50,11 +50,4 @@ irqreturn_t iio_pollfunc_store_time(int irq, void *p); · 49 unmodified lines
50 50
51void iio_trigger_notify_done(struct iio_trigger *trig);51void iio_trigger_notify_done(struct iio_trigger *trig);
52 52
53/*
54 * Two functions for common case where all that happens is a pollfunc
55 * is attached and detached from a trigger
56 */
57int iio_triggered_buffer_postenable(struct iio_dev *indio_dev);
58int iio_triggered_buffer_predisable(struct iio_dev *indio_dev);
59
60#endif53#endif