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
Subject: Re: [PATCH 2/3] iio: adc: palmas_gpadc: remove adc_wakeupX_data
Date: Sun, 26 Mar 2023 17:53:51 +0100 [thread overview]
Message-ID: <20230326175258.2ba6abb1@jic23-huawei> (raw)
In-Reply-To: <20230319223908.108540-3-risca@dalakolonin.se>
On Sun, 19 Mar 2023 23:39:07 +0100
Patrik Dahlström <risca@dalakolonin.se> wrote:
> It does not seem to be used by anyone and having two ways to configure
> the same thing but for different use cases is bound to introduce bugs.
> This removes the special use case and leaves the generic one. It's still
> possible to achieve the same thing as before from userspace.
It wasn't possible to do it from userspace previously and there
is no way to turn it off without userspace having to explicitly disable events
before suspending.
We could look at adding a userspace control on whether wakeup is enabled.
However, I'd raise the question of does anyone care for this particular device
anymore.
As mentioned in patch 1 review, alternative is support either events or wakeup
configured at boot (if clever maybe allow for one of each combination as well).
That would keep to the old flows working and enable what you want.
Jonathan
>
> Signed-off-by: Patrik Dahlström <risca@dalakolonin.se>
> ---
> drivers/iio/adc/palmas_gpadc.c | 18 ------------------
> include/linux/mfd/palmas.h | 2 --
> 2 files changed, 20 deletions(-)
>
> diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
> index 84c6e3b66205..419d7db51345 100644
> --- a/drivers/iio/adc/palmas_gpadc.c
> +++ b/drivers/iio/adc/palmas_gpadc.c
> @@ -948,18 +948,6 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
> "request auto1 irq %d failed\n",
> adc->irq_auto_1);
>
> - if (gpadc_pdata->adc_wakeup1_data) {
> - memcpy(&adc->wakeup1_data, gpadc_pdata->adc_wakeup1_data,
> - sizeof(adc->wakeup1_data));
> - adc->wakeup1_enable = true;
> - }
> -
> - if (gpadc_pdata->adc_wakeup2_data) {
> - memcpy(&adc->wakeup2_data, gpadc_pdata->adc_wakeup2_data,
> - sizeof(adc->wakeup2_data));
> - adc->wakeup2_enable = true;
> - }
> -
> adc->event0.channel = -1;
> adc->event0.direction = IIO_EV_DIR_NONE;
> adc->event1.channel = -1;
> @@ -1004,12 +992,6 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
> }
>
> device_set_wakeup_capable(&pdev->dev, 1);
> - if (adc->wakeup1_enable || adc->wakeup2_enable) {
> - ret = palmas_adc_wakeup_configure(adc);
> - if (ret)
> - return ret;
> - device_wakeup_enable(&pdev->dev);
> - }
> ret = devm_add_action_or_reset(&pdev->dev,
> palmas_disable_wakeup,
> adc);
> diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
> index 1e61c7e9f50d..dc79d5e2d680 100644
> --- a/include/linux/mfd/palmas.h
> +++ b/include/linux/mfd/palmas.h
> @@ -153,8 +153,6 @@ struct palmas_gpadc_platform_data {
> int start_polarity;
>
> int auto_conversion_period_ms;
> - struct palmas_adc_wakeup_property *adc_wakeup1_data;
> - struct palmas_adc_wakeup_property *adc_wakeup2_data;
> };
>
> struct palmas_reg_init {
next prev parent reply other threads:[~2023-03-26 16:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 22:39 [PATCH 0/3] iio: adc: palmas_gpadc: add iio events Patrik Dahlström
2023-03-19 22:39 ` [PATCH 1/3] iio: adc: palmas_gpadc: add support for iio threshold events Patrik Dahlström
2023-03-21 20:40 ` H. Nikolaus Schaller
2023-04-01 18:15 ` Patrik Dahlström
2023-03-26 16:51 ` Jonathan Cameron
2023-04-01 18:45 ` Patrik Dahlström
2023-04-02 16:43 ` Jonathan Cameron
2023-03-19 22:39 ` [PATCH 2/3] iio: adc: palmas_gpadc: remove adc_wakeupX_data Patrik Dahlström
2023-03-26 16:53 ` Jonathan Cameron [this message]
2023-03-19 22:39 ` [PATCH 3/3] iio: adc: palmas_gpadc: remove palmas_adc_wakeup_property Patrik Dahlström
2023-03-26 16:59 ` Jonathan Cameron
2023-04-01 19:01 ` Patrik Dahlström
2023-03-21 20:40 ` [PATCH 0/3] iio: adc: palmas_gpadc: add iio events H. Nikolaus Schaller
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=20230326175258.2ba6abb1@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=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