[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230402164247.3089146-8-risca@dalakolonin.se>
Date: Sun, 2 Apr 2023 18:42:47 +0200
From: Patrik Dahlström <risca@...akolonin.se>
To: linux-iio@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, letux-kernel@...nphoenux.org,
kernel@...a-handheld.com, pgoudagunta@...dia.com,
hns@...delico.com, jic23@...nel.org, lars@...afoo.de,
linux-omap@...r.kernel.org,
Patrik Dahlström <risca@...akolonin.se>
Subject: [PATCH v2 7/7] 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@...akolonin.se>
---
drivers/iio/adc/palmas_gpadc.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
index f693d69a10a8..d4e1e80296d0 100644
--- a/drivers/iio/adc/palmas_gpadc.c
+++ b/drivers/iio/adc/palmas_gpadc.c
@@ -1127,16 +1127,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);
@@ -1150,16 +1144,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);
--
2.25.1
Powered by blists - more mailing lists