Skip to content

Commit 51be62d

Browse files
mgonellabolducgregkh
authored andcommitted
Input: cyttsp5 - fix power control issue on wakeup
commit 7675b5e upstream. 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: 3c98b8d ("Input: cyttsp5 - implement proper sleep and wakeup procedures") Cc: stable@vger.kernel.org Signed-off-by: Mikael Gonella-Bolduc <mgonellabolduc@dimonoff.com> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Alistair Francis <alistair@alistair23.me> Link: https://lore.kernel.org/r/20250423135243.1261460-1-hugo@hugovil.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d02062e commit 51be62d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/touchscreen/cyttsp5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ static int cyttsp5_power_control(struct cyttsp5 *ts, bool on)
580580
int rc;
581581

582582
SET_CMD_REPORT_TYPE(cmd[0], 0);
583-
SET_CMD_REPORT_ID(cmd[0], HID_POWER_SLEEP);
583+
SET_CMD_REPORT_ID(cmd[0], state);
584584
SET_CMD_OPCODE(cmd[1], HID_CMD_SET_POWER);
585585

586586
rc = cyttsp5_write(ts, HID_COMMAND_REG, cmd, sizeof(cmd));

0 commit comments

Comments
 (0)