mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 23:24:11 +08:00
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>
This commit is contained in:
parent
a99544c6c8
commit
52cc189b4f
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user