History log of /linux-master/include/linux/libps2.h
Revision Date Author Comments
# c4c7eac8 15-May-2023 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - introduce common interrupt handler

Instead of exposing inner workings of libps2 to drivers such as atkbd and
psmouse, have them define pre-receive and receive callbacks, and provide a
common handler that can be used with underlying serio port.

While at this add kerneldoc to the module.

Link: https://lore.kernel.org/r/ZGK81cxqjr/KS1kA@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# fc522f3b 11-May-2023 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - remove special handling of ACK for command byte

When getting unexpected data while waiting for an acknowledgement it does
not matter what command phase is currently executed, and ps2_handle_ack()
should indicate that no further processing is needed for the received data
byte. Remove PS2_FLAG_ACK_CMD and associated handling.

Note that while it is possible to make ps2_handle_ack (and
ps2_handle_repsonse) return void, it will be done when the code will be
converted to common PS/2 interrupt handler later.

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


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

Based on 2 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 29acc42e 17-Jan-2018 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - relax command byte ACK handling

When we probe PS/2 devices we first issue "Get ID" command and only if we
receive what we consider a valid keyboard or mouse ID we disable the device
and continue with protocol detection. That means that the device may be
transmitting motion or keystroke data, while we expect ACK response.

Instead of signaling failure if we see anything but ACK/NAK let's ignore
"garbage" response until we see ACK for the command byte (first byte). The
checks for subsequent ACKs of command parameters will continue be strict.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 08be954b 02-Jan-2018 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: psmouse - move sliced command implementation to libps2

In preparation to adding some debugging statements to PS/2 control
sequences let's move psmouse_sliced_command() into libps2 and rename it
to ps2_sliced_command().

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 3a92dd33 04-Jan-2018 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - use BIT() for bitmask constants

Let's explicitly document bit numbers with BIT() macro.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# b28bad65 04-Jan-2018 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - use u8 for byte data

Instead of using unsigned char for the byte data switch to using u8. Also
use unsigned int for the command codes and timeouts, and have
ps2_handle_ack() and ps2_handle_response() return bool instead of int, as
they do not return error codes but rather signal whether a byte was handled
or not handled. ps2_is_keyboard_id() now returns bool as well.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 80524f08 21-Nov-2012 Kamal Mostafa <kamal@canonical.com>

Input: increase struct ps2dev cmdbuf[] to 8 bytes

Cypress PS/2 Trackpad (drivers/input/mouse/cypress_ps2.c) needs
this larger cmdbuf[] to handle 8-byte packet responses.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 181d683d 16-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - additional locking for i8042 ports

The serio ports on i8042 are not completely isolated; while we provide
enough locking to ensure proper serialization when accessing control
and data registers AUX and KBD ports can still have an effect on each
other on PS/2 protocol level. The most prominent effect is that
issuing a command for the device connected to one port may cause
abort of the command currently executing by the device connected to
another port.

Since i8042 nor serio subsystem are not aware of the details of the
PS/2 protocol (length of the commands and their replies and so on) the
locking should be done on libps2 level by adding special handling when
we see that we are dealing with serio port on i8042.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# fc69f4a6 10-May-2009 Tai-hwa Liang <avatar@sentelic.com>

Input: add new driver for Sentelic Finger Sensing Pad

This is the driver for Sentelic Finger Sensing Pad which can be found
on MSI WIND Netbook.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# a2d781fc 19-Nov-2008 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - handle 0xfc responses from devices

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# ccd34745 05-May-2008 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - remove delayed command execution

Delayed command execution is not used by anyone so let's remove it.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 9807879b 13-Sep-2006 Dmitry Torokhov <dtor@insightbb.com>

Input: atkbd - support Microsoft Natural Elite Pro keyboards

Microsoft Natural Elite Pro keyboard produces unisual response to
the GET ID command - single byte 0xaa (normally keyboards produce
2-byte response). Fail GET ID command so atkbd gets a change to
do alternate probe.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# c4e32e9f 18-Feb-2006 Arjan van de Ven <arjan@infradead.org>

Input: serio - semaphore to mutex conversion

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# c611763d 01-Jun-2005 Dmitry Torokhov <dtor_core@ameritech.net>

Input: add ps2_drain() to libps2 to allow reading and discarding
given number of bytes from device. Change ps2_command to
allow using 0 as command ID and actually pass it to the
device instead of working as a drain.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!