From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: Benjamin Tissoires <bentiss@kernel.org>,
Binbin Zhou <zhoubinbin@loongson.cn>,
Binbin Zhou <zhoubb.aaron@gmail.com>,
Huacai Chen <chenhuacai@loongson.cn>,
Jon Xie <jon_xie@pixart.com>, Jay Lee <jay_lee@pixart.com>,
linux-input@vger.kernel.org, Xiaotian Wu <wuxiaotian@loongson.cn>
Subject: Re: [PATCH v4] Input: Add driver for PixArt PS/2 touchpad
Date: Tue, 1 Oct 2024 06:15:41 -0700 [thread overview]
Message-ID: <Zvv1_bHoH94-e33b@google.com> (raw)
In-Reply-To: <CAAhV-H6WuYVa=X08NV+2XtDrcxDNfT8ti9zQ0Kc+tWM7m9iLQQ@mail.gmail.com>
On Tue, Oct 01, 2024 at 08:16:07PM +0800, Huacai Chen wrote:
> Hi, Dmitry,
>
> On Tue, Oct 1, 2024 at 7:50 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > On Tue, Oct 01, 2024 at 11:21:10AM +0200, Benjamin Tissoires wrote:
> > > On Oct 01 2024, Dmitry Torokhov wrote:
> > > > On Tue, Oct 01, 2024 at 01:53:44AM -0700, Dmitry Torokhov wrote:
> > > > > On Mon, Sep 30, 2024 at 05:59:01PM +0200, Benjamin Tissoires wrote:
> > > > > > Hi,
> > > > > >
> > > > > > On Jul 04 2024, Binbin Zhou 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@pixart.com>
> > > > > > > Signed-off-by: Jon Xie <jon_xie@pixart.com>
> > > > > > > Co-developed-by: Jay Lee <jay_lee@pixart.com>
> > > > > > > Signed-off-by: Jay Lee <jay_lee@pixart.com>
> > > > > > > Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> > > > > >
> > > > > > It looks like this new driver made in v6.12-rc1 but is already breaking
> > > > > > other touchpads in fedora:
> > > > > >
> > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=2314756
> > > > > >
> > > > > > The reported touchpads used to work properly but are now directed to use
> > > > > > the PixArt PS2 driver instead of the old one (I would say it should be
> > > > > > using Synaptics).
> > > > > >
> > > > > > I haven't touched PS/2 in a long time, so it's going to be hard to
> > > > > > pinpoint the error from my side, but it seems that the new driver is a
> > > > > > little bit too greedy.
> > > > >
> > > > > OK, I gonna revert it and hope PixArt folks will figure out less greedy
> > > > > probing sequence (or maybe we need to push it down a few sports).
> > > >
> > > > Although, as I am trying to read the referenced bug, one of the
> > > > reporters are saying that they touchpad is USB:
> > > >
> > > > SysFS ID: /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0
> > > > ysFS BusID: 3-3:1.0
> > > > Hardware Class: unknown
> > > > Model: "Synaptics Unclassified device"
> > > > Hotplug: USB
> > > > Vendor: usb 0x06cb "Synaptics, Inc."
> > >
> > > I guess this must be the fingerprint reader or some other synaptics
> > > device.
> > >
> > > In the 6.11 logs (now publicly available), we can see:
> > > [ 1.601507] psmouse serio1: trackpoint: Elan TrackPoint firmware: 0x92, buttons: 3/3
> > > [ 1.614026] input: TPPS/2 Elan TrackPoint as /devices/platform/i8042/serio1/input/input5
> > > ...
> > > [ 2.286700] input: ELAN0672:00 04F3:3187 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN0672:00/0018:04F3:3187.0002/input/input7
> > > [ 2.286834] input: ELAN0672:00 04F3:3187 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN0672:00/0018:04F3:3187.0002/input/input9
> > > [ 2.286873] hid-generic 0018:04F3:3187.0002: input,hidraw1: I2C HID v1.00 Mouse [ELAN0672:00 04F3:3187] on i2c-ELAN0672:00
> > > ...
> > > [ 2.337123] input: ELAN0672:00 04F3:3187 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN0672:00/0018:04F3:3187.0002/input/input10
> > > [ 2.337173] input: ELAN0672:00 04F3:3187 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN0672:00/0018:04F3:3187.0002/input/input12
> > > [ 2.337212] hid-multitouch 0018:04F3:3187.0002: input,hidraw1: I2C HID v1.00 Mouse [ELAN0672:00 04F3:3187] on i2c-ELAN0672:00
> > >
> > >
> > > So the touchpad seems to have the PS/2 fallback, and then switches to
> > > i2c-HID. However, with PixArt the PS/2 touchpad isn't initialized, and
> > > doesn't answered to i2c-hid (or is too much initialized, not sure).
> >
> > I see. It is interesting that the first probe fails:
> >
> > [ 1.649119] psmouse serio1: pixart_ps2: init: Unable to query PixArt touchpad hardware.
> >
> >
> > but then it goes and detects it a bit later:
> >
> > [ 1.945075] input: PS/2 PixArt clickpad as /devices/platform/i8042/serio1/input/input5
> >
> > It would be curious to get the logs of the failing case with
> > i8042.debug=1
> >
> > Anyway, I reverted the patch adding the driver and will send a pull
> > request to Linus soon.
> Don't revert now, I found the root cause:
OK, so please make a fix and resubmit the whole thing for the next merge
window. I think it needs to cook a little bit more and get more testing
before it can be merged in mainline, given how fragile PS/2 detection
is.
> In pixart_read_tp_type(), we can see
>
> + error = ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO);
> + if (error)
> + return error;
> +
> + *type = param[0] == 0x0e ? PIXART_TYPE_TOUCHPAD : PIXART_TYPE_CLICKPAD;
> +
> + return 0;
>
> This means, a non-pixart device will also be detected as "pixart
> clickpad" and return 0, unless the ps2 doesn't work at all.
>
> And then in pixart_detect(), we can see
>
> + if (set_properties) {
> + psmouse->vendor = "PixArt";
> + psmouse->name = (type == PIXART_TYPE_TOUCHPAD) ?
> + "touchpad" : "clickpad";
> + }
>
> This will confuse the later logic.
>
> Huacai
Thanks.
--
Dmitry
next prev parent reply other threads:[~2024-10-01 13:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 12:52 [PATCH v4] Input: Add driver for PixArt PS/2 touchpad Binbin Zhou
2024-07-24 4:31 ` Dmitry Torokhov
2024-07-24 10:00 ` Binbin Zhou
2024-09-30 15:59 ` Benjamin Tissoires
2024-10-01 8:53 ` Dmitry Torokhov
2024-10-01 9:04 ` Dmitry Torokhov
2024-10-01 9:21 ` Benjamin Tissoires
2024-10-01 11:50 ` Dmitry Torokhov
2024-10-01 12:16 ` Huacai Chen
2024-10-01 13:15 ` Dmitry Torokhov [this message]
2024-10-08 10:47 ` Binbin Zhou
2024-10-08 12:48 ` Benjamin Tissoires
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=Zvv1_bHoH94-e33b@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=bentiss@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=jay_lee@pixart.com \
--cc=jon_xie@pixart.com \
--cc=linux-input@vger.kernel.org \
--cc=wuxiaotian@loongson.cn \
--cc=zhoubb.aaron@gmail.com \
--cc=zhoubinbin@loongson.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.