Input: libps2 - rework handling of command response
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 11 May 2023 18:52:43 +0000 (11:52 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 18 May 2023 18:40:32 +0000 (11:40 -0700)
commitdf9fe0e653c28756ab98f58175f8c58baf156ef1
tree4031515b8a10bd3147220855ce153f01e199dbe0
parentfc522f3bdf43efa75b54775978b6b6c19d0d997d
Input: libps2 - rework handling of command response

It is not entirely correct that libps2 sets PS2_FLAG_CMD1 after
the device acknowledges each byte sent to the device by the host.
Rework the code so that PS2_FLAG_CMD1 and PS2_FLAG_CMD are set only once,
at the beginning of PS/2 command execution.

Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Link: https://lore.kernel.org/r/20230511185252.386941-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/serio/libps2.c