summaryrefslogtreecommitdiff
path: root/drivers/iio/industrialio-buffer.c
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2022-01-11 14:04:02 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-01-23 18:03:36 +0000
commit84e5d88953d765e5da14f96dd30b0b1cc215c157 (patch)
treee35a2a986e627f4e91f2d7a196886c1eb9a65741 /drivers/iio/industrialio-buffer.c
parent0f66edfb0722bc424c5d8300e5a938b1b7c5c78f (diff)
iio: adc: tsc2046: rework the trigger state machine
Initially this was designed to: | Fix sleeping in atomic context warning and a deadlock after iio_trigger_poll() | call | | If iio_trigger_poll() is called after IRQ was disabled, we will call | reenable_trigger() directly from hard IRQ or hrtimer context instead of | IRQ thread. In this case we will run in to multiple issue as sleeping in atomic | context and a deadlock. | | To avoid this issue, rework the trigger to use state machine. All state | changes are done over the hrtimer, so it allows us to drop fsleep() and | avoid the deadlock. Since this issue was fixed by: 9020ef659885 ("iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046"). This patch is a cleanup to make state machine easier to follow. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/r/20220111130402.3404769-1-o.rempel@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/industrialio-buffer.c')
0 files changed, 0 insertions, 0 deletions