]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: light: ltr390: Implement runtime PM support
authorAkshay Jindal <akshayaj.lkd@gmail.com>
Tue, 9 Sep 2025 19:46:46 +0000 (01:16 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 13 Sep 2025 12:18:16 +0000 (13:18 +0100)
commitabe629ebdabea4827f7c8f1c8fe79caf1fc4deb9
tree031be2e2ac0e5bc3db08a6b14c0a976466c8c611
parent661facba437e37c1685606825b9fd59be3f78771
iio: light: ltr390: Implement runtime PM support

Implement runtime power management for the LTR390 sensor. The device
autosuspends after 1s of idle time, reducing current consumption from
100 µA in active mode to 1 µA in standby mode as per the datasheet.

Ensure that interrupts continue to be delivered with runtime PM.
Since the LTR390 cannot be used as a wakeup source during runtime
suspend, therefore increment the runtime PM refcount when enabling
events and decrement it when disabling events or powering down.
This prevents event loss while still allowing power savings when IRQs
are unused.

Signed-off-by: Akshay Jindal <akshayaj.lkd@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/ltr390.c