• Lars-Peter Clausen's avatar
    iio: Move attach/detach of the poll func to the core · f11d59d8
    Lars-Peter Clausen authored
    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.
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
    Tested-by: Eugen Hristev <eugen.hristev@microchip.com> #for at91-sama5d2-adc
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    f11d59d8
si1145.c 34.3 KB