lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230407182243.5df2eaeb@jic23-huawei>
Date:   Fri, 7 Apr 2023 18:22:43 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Patrik Dahlström <risca@...akolonin.se>
Cc:     linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        letux-kernel@...nphoenux.org, kernel@...a-handheld.com,
        pgoudagunta@...dia.com, hns@...delico.com, lars@...afoo.de,
        linux-omap@...r.kernel.org
Subject: Re: [PATCH v3 7/7] iio: adc: palmas: don't alter event config on
 suspend/resume

On Wed,  5 Apr 2023 23:22:33 +0200
Patrik Dahlström <risca@...akolonin.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@...akolonin.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);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ