iio: trigger: allow devices to suspend/resume theirs associated trigger
authorDenis Benato <benato.denis96@gmail.com>
Wed, 7 Aug 2024 18:56:18 +0000 (20:56 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 10 Aug 2024 10:19:36 +0000 (11:19 +0100)
commit2837efdc7cef5b86b0c4d94a7410bc03cc2f003f
tree634b2424844d3a81a32077231dd2fa3c79c66540
parentb4b4817bbf9aebb2071d8b887a970610ee943f91
iio: trigger: allow devices to suspend/resume theirs associated trigger

When a machine enters a sleep state while a trigger is associated to
an iio device that trigger is not resumed after exiting the sleep state:
provide iio device drivers a way to suspend and resume
the associated trigger to solve the aforementioned bug.

Each iio driver supporting external triggers is expected to call
iio_device_suspend_triggering before suspending,
and iio_device_resume_triggering upon resuming.

Signed-off-by: Denis Benato <benato.denis96@gmail.com>
Link: https://patch.msgid.link/20240807185619.7261-2-benato.denis96@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-trigger.c
include/linux/iio/iio.h