summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorPatrik Dahlström <risca@dalakolonin.se>2023-04-08 13:48:25 +0200
committerJonathan Cameron <jonathan.cameron@huawei.com>2023-04-13 12:10:11 +0100
commit52cc189b4fc6af6accc45fe7b7053d76d8724059 (patch)
tree954b1d00143cf7b481c32951616404c2ad6c1a08 /drivers/iio/adc
parenta99544c6c883f5fdd1b326b245572ca22cabc421 (diff)
downloadlinux-stable-52cc189b4fc6af6accc45fe7b7053d76d8724059.tar.gz
linux-stable-52cc189b4fc6af6accc45fe7b7053d76d8724059.tar.bz2
linux-stable-52cc189b4fc6af6accc45fe7b7053d76d8724059.zip
iio: adc: palmas: don't alter event config on suspend/resume
The event config is controlled through the IIO events subsystem and device wakeup is controlled by /sys/devices/.../power/wakeup. Let's keep those two knobs independent. Signed-off-by: Patrik Dahlström <risca@dalakolonin.se> Link: https://lore.kernel.org/r/20230408114825.824505-10-risca@dalakolonin.se Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/palmas_gpadc.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
index 071795c8de1d..c1c439215aeb 100644
--- a/drivers/iio/adc/palmas_gpadc.c
+++ b/drivers/iio/adc/palmas_gpadc.c
@@ -1133,16 +1133,10 @@ static int palmas_gpadc_suspend(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct palmas_gpadc *adc = iio_priv(indio_dev);
- int wakeup = adc->event0.enabled || adc->event1.enabled;
- int ret;
- if (!device_may_wakeup(dev) || !wakeup)
+ if (!device_may_wakeup(dev))
return 0;
- ret = palmas_adc_configure_events(adc);
- if (ret < 0)
- return ret;
-
if (adc->event0.enabled)
enable_irq_wake(adc->irq_auto_0);
@@ -1156,16 +1150,10 @@ static int palmas_gpadc_resume(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct palmas_gpadc *adc = iio_priv(indio_dev);
- int wakeup = adc->event0.enabled || adc->event1.enabled;
- int ret;
- if (!device_may_wakeup(dev) || !wakeup)
+ if (!device_may_wakeup(dev))
return 0;
- ret = palmas_adc_reset_events(adc);
- if (ret < 0)
- return ret;
-
if (adc->event0.enabled)
disable_irq_wake(adc->irq_auto_0);