Re: [PATCH v5] Input: Add driver for PixArt PS/2 touchpad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

On 10/23/2024 4:52 PM, Binbin Zhou wrote:
On Wed, Oct 23, 2024 at 2:38 PM Binbin Zhou <zhoubinbin@xxxxxxxxxxx> wrote:

This patch introduces a driver for the PixArt PS/2 touchpad, which
supports both clickpad and touchpad types.

At the same time, we extended the single data packet length to 16,
because according to the current PixArt hardware and FW design, we need
11 bytes/15 bytes to represent the complete three-finger/four-finger data.

Co-developed-by: Jon Xie <jon_xie@xxxxxxxxxx>
Signed-off-by: Jon Xie <jon_xie@xxxxxxxxxx>
Co-developed-by: Jay Lee <jay_lee@xxxxxxxxxx>
Signed-off-by: Jay Lee <jay_lee@xxxxxxxxxx>
Signed-off-by: Binbin Zhou <zhoubinbin@xxxxxxxxxxx>
Tested-by: Kexy Biscuit <kexybiscuit@xxxxxxx>
---
V5:
  - Rebased on input/for-linus;
  - Fix wide PixArt TP type judgment in pixart_read_tp_type().
    Each type has a unique FW return value to avoid non-pixart touchpads
    being misjudged.
  - Thanks to Kexy for testing on non-pixart devices.
    The List of tested touchpad devices:
      - TPPS/2(broken on V4)
      - SynPS/2 Synaptics TouchPad

Hi Benjamin:

I've rewritten the PixArt TP type judgment condition to avoid false
positives for non-PixArt devices. I tested it on several PS/2 devices
without problems.
To be more rigorous, if it's convenient for you, please help me test
the previously problematic devices based on this patch.

Thanks.
Binbin
Gently ping. Benjamin, do you have time to test this new version of
patch on the devices that this PixArt PS/2 patch broke?

Link to V4:
https://lore.kernel.org/all/20240704125243.3633569-1-zhoubinbin@xxxxxxxxxxx/

V4:
  - Thanks Dmitry for the review.
    - Just return what ps2_command() reports, instead of replacing it with
      -EIO;
    - Refact pixart_read_tp_mode/pixart_read_tp_type(), to separate mode
      value and errors/success;
    - Pass the INPUT_MT_POINTER flag to input_mt_init_slots() and remove
      some redundant code, like the call to input_mt_report_finger_count()
      and the setting of bits in the touchpad section.

Link to V3:
https://lore.kernel.org/all/20240701094953.3195501-1-zhoubinbin@xxxxxxxxxxx/

V3:
  - Rebased on input/next;
  - Added comment to msleep() in pixart_reset() as suggested by Aseda, no
functional change, thanks.

Link to V2:
https://lore.kernel.org/all/20240624065359.2985060-1-zhoubinbin@xxxxxxxxxxx/

V2:
  - Rebased on input/next;
  - Merge two patches from the V1 patchset;
  - Initialize local variables to prevent random garbage;
  - Remove some noisy debug message;
  - Check ps2_command() return value;
  - Use macros to represent bit operations for better readability, such
    as abs_x;
  - Remove the code related to rel packets, for the normal
    intellimouse detection is well in PixArt.

Link to V1:
https://lore.kernel.org/all/cover.1715224143.git.zhoubinbin@xxxxxxxxxxx/

  drivers/input/mouse/Kconfig        |  12 ++
  drivers/input/mouse/Makefile       |   1 +
  drivers/input/mouse/pixart_ps2.c   | 310 +++++++++++++++++++++++++++++
  drivers/input/mouse/pixart_ps2.h   |  36 ++++
  drivers/input/mouse/psmouse-base.c |  17 ++
  drivers/input/mouse/psmouse.h      |   3 +-
  6 files changed, 378 insertions(+), 1 deletion(-)
  create mode 100644 drivers/input/mouse/pixart_ps2.c
  create mode 100644 drivers/input/mouse/pixart_ps2.h

(patch body trimmed)

base-commit: 2de01e0e57f3ebe7f90b08f6bca5ce0f3da3829f
--
2.43.5


Also pinging Dmitry - could you please review this new version?
--
Best Regards,
Kexy Biscuit




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux