From: Jonathan Cameron <jic23@kernel.org>
To: "Patrik Dahlström" <risca@dalakolonin.se>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
letux-kernel@openphoenux.org, kernel@pyra-handheld.com,
pgoudagunta@nvidia.com, hns@goldelico.com, lars@metafoo.de,
linux-omap@vger.kernel.org
Subject: Re: [PATCH v3 7/7] iio: adc: palmas: don't alter event config on suspend/resume
Date: Fri, 7 Apr 2023 18:22:43 +0100 [thread overview]
Message-ID: <20230407182243.5df2eaeb@jic23-huawei> (raw)
In-Reply-To: <20230405212233.4167986-8-risca@dalakolonin.se>
On Wed, 5 Apr 2023 23:22:33 +0200
Patrik Dahlström <risca@dalakolonin.se> wrote:
> 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>
Rest of series that I haven't replied to looks fine to me.
Once the fix patch dependency is in the right upstream branch
I'll get this and the devm patch queued up if no other comments come
in.
> ---
> 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 2e0755e9e3a4..ba3cc0e68197 100644
> --- a/drivers/iio/adc/palmas_gpadc.c
> +++ b/drivers/iio/adc/palmas_gpadc.c
> @@ -1137,16 +1137,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);
>
> @@ -1160,16 +1154,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);
>
next prev parent reply other threads:[~2023-04-07 17:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 21:22 [PATCH v3 0/7] iio: adc: palmas_gpadc: add iio events Patrik Dahlström
2023-04-05 21:22 ` [PATCH v3 1/7] iio: adc: palmas: remove adc_wakeupX_data Patrik Dahlström
2023-04-05 21:22 ` [PATCH v3 2/7] iio: adc: palmas: replace "wakeup" with "event" Patrik Dahlström
2023-04-05 21:22 ` [PATCH v3 3/7] iio: adc: palmas: use iio_event_direction for threshold polarity Patrik Dahlström
2023-04-05 21:22 ` [PATCH v3 4/7] iio: adc: palmas: move eventX_enable into palmas_adc_event Patrik Dahlström
2023-04-05 21:22 ` [PATCH v3 5/7] iio: adc: palmas: always reset events on unload Patrik Dahlström
2023-04-05 21:22 ` [PATCH v3 6/7] iio: adc: palmas: add support for iio threshold events Patrik Dahlström
2023-04-07 17:19 ` Jonathan Cameron
2023-04-08 11:31 ` Patrik Dahlström
2023-04-05 21:22 ` [PATCH v3 7/7] iio: adc: palmas: don't alter event config on suspend/resume Patrik Dahlström
2023-04-07 17:22 ` Jonathan Cameron [this message]
2023-04-07 17:04 ` [PATCH v3 0/7] iio: adc: palmas_gpadc: add iio events Jonathan Cameron
2023-04-07 17:09 ` Jonathan Cameron
2023-04-08 10:51 ` Patrik Dahlström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230407182243.5df2eaeb@jic23-huawei \
--to=jic23@kernel.org \
--cc=hns@goldelico.com \
--cc=kernel@pyra-handheld.com \
--cc=lars@metafoo.de \
--cc=letux-kernel@openphoenux.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=pgoudagunta@nvidia.com \
--cc=risca@dalakolonin.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox