linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alistair <alistair@alistair23.me>
To: "Hugo Villeneuve" <hugo@hugovil.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Maximilian Weigand" <mweigand@mweigand.net>
Cc: "Mikael Gonella-Bolduc" <mgonellabolduc@dimonoff.com>,
	stable@vger.kernel.org,
	"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
	linux-input@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] Input: cyttsp5 - fix power control issue on wakeup
Date: Thu, 24 Apr 2025 18:00:02 +1000	[thread overview]
Message-ID: <ed682022-509e-452b-b4f8-7ddeb17a2475@app.fastmail.com> (raw)
In-Reply-To: <20250423135243.1261460-1-hugo@hugovil.com>

On Wed, 23 Apr 2025, at 11:52 PM, Hugo Villeneuve wrote:
> From: Mikael Gonella-Bolduc <mgonellabolduc@dimonoff.com>
> 
> The power control function ignores the "on" argument when setting the
> report ID, and thus is always sending HID_POWER_SLEEP. This causes a
> problem when trying to wakeup.
> 
> Fix by sending the state variable, which contains the proper HID_POWER_ON or
> HID_POWER_SLEEP based on the "on" argument.
> 
> Fixes: 3c98b8dbdced ("Input: cyttsp5 - implement proper sleep and wakeup procedures")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> Signed-off-by: Mikael Gonella-Bolduc <mgonellabolduc@dimonoff.com>

Reviewed-by: Alistair Francis <alistair@alistair23.me>

Alistair

> ---
> Changes for v2:
> - Add Mikael SOB tag
> 
> drivers/input/touchscreen/cyttsp5.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
> index eafe5a9b89648..86edcacb4ab3e 100644
> --- a/drivers/input/touchscreen/cyttsp5.c
> +++ b/drivers/input/touchscreen/cyttsp5.c
> @@ -580,7 +580,7 @@ static int cyttsp5_power_control(struct cyttsp5 *ts, bool on)
> int rc;
>  
> SET_CMD_REPORT_TYPE(cmd[0], 0);
> - SET_CMD_REPORT_ID(cmd[0], HID_POWER_SLEEP);
> + SET_CMD_REPORT_ID(cmd[0], state);
> SET_CMD_OPCODE(cmd[1], HID_CMD_SET_POWER);
>  
> rc = cyttsp5_write(ts, HID_COMMAND_REG, cmd, sizeof(cmd));
> 
> base-commit: 7adf8b1afc14832de099f9e178f08f91dc0dd6d0
> -- 
> 2.39.5
> 
> 

  reply	other threads:[~2025-04-24  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 13:52 [PATCH v2] Input: cyttsp5 - fix power control issue on wakeup Hugo Villeneuve
2025-04-24  8:00 ` Alistair [this message]
2025-04-28 19:19 ` Dmitry Torokhov

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=ed682022-509e-452b-b4f8-7ddeb17a2475@app.fastmail.com \
    --to=alistair@alistair23.me \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hugo@hugovil.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgonellabolduc@dimonoff.com \
    --cc=mweigand@mweigand.net \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).