Skip to content
Commit f3c034f6 authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jonathan Cameron
Browse files

iio: at91-sama5d2_adc: adjust iio_triggered_buffer_{predisable,postenable} positions



The iio_triggered_buffer_{predisable,postenable} functions attach/detach
poll functions.

In most cases the iio_triggered_buffer_postenable() should be called first
to attach the poll function, and then the driver can init the data to be
triggered.
In this case it's the other way around: the DMA code should be initialized
before the attaching the poll function and the reverse should be done when
un-initializing.

To make things easier when removing the iio_triggered_buffer_postenable() &
iio_triggered_buffer_predisable() functions from the IIO core API, the DMA
code has been moved into preenable() for init, and postdisable() for
uninit.

Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 065056cb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment