Skip to content
Commit f6dbf83c authored by Jonathan Bakker's avatar Jonathan Bakker Committed by Jonathan Cameron
Browse files

iio: light: gp2ap002: Take runtime PM reference on light read



The light sensor needs the regulators to be enabled which means
the runtime PM needs to be on.  This only happened when the
proximity part of the chip was enabled.

As fallout from this change, only report changes to the prox
state in the interrupt handler when it is explicitly enabled.

Fixes: 97d642e2 ("iio: light: Add a driver for Sharp GP2AP002x00F")
Signed-off-by: default avatarJonathan Bakker <xc-racer2@live.ca>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1ecca8a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment