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] [day] [month] [year] [list]
Message-ID: <Z8_Fgx4YWwdpB1XK@google.com>
Date: Mon, 10 Mar 2025 22:09:23 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Ulf Hansson <ulf.hansson@...aro.org>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH] Input: hisi_powerkey: Enable system-wakeup for s2idle

Hi Ulf,

On Thu, Mar 06, 2025 at 12:50:21PM +0100, Ulf Hansson wrote:
> To wake up the system from s2idle when pressing the power-button, let's
> convert from using pm_wakeup_event() to pm_wakeup_dev_event(), as it allows
> us to specify the "hard" in-parameter, which needs to be set for s2idle.

I was looking at pm_wakeup_event() and pm_wakeup_dev_event() and I am
afraid I do not understand the distinction. Why would we want to
abort suspend by only by some wakeup sources and not by others? And why
does a driver need to know whether a system uses s2idle or some other
implementation of low power state?

FWIW we have Chromebooks that use S0ix and Chromebooks that use S3 as
well as ARM Chromebooks and I do not think they use
pm_wakeup_dev_event() variant.

I'm cc-ing Rafael to give us some guidance.

> 
> Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
> ---
>  drivers/input/misc/hisi_powerkey.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/misc/hisi_powerkey.c b/drivers/input/misc/hisi_powerkey.c
> index d3c293a95d32..d315017324d9 100644
> --- a/drivers/input/misc/hisi_powerkey.c
> +++ b/drivers/input/misc/hisi_powerkey.c
> @@ -30,7 +30,7 @@ static irqreturn_t hi65xx_power_press_isr(int irq, void *q)
>  {
>  	struct input_dev *input = q;
>  
> -	pm_wakeup_event(input->dev.parent, MAX_HELD_TIME);
> +	pm_wakeup_dev_event(input->dev.parent, MAX_HELD_TIME, true);
>  	input_report_key(input, KEY_POWER, 1);
>  	input_sync(input);
>  
> -- 
> 2.43.0
> 

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ