lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABxCQKucaDFHb+faMz6w6GOWNrbA_nDb4zhA8xrWmq=Qj8ZpgA@mail.gmail.com>
Date: Mon, 30 Jun 2025 20:21:02 +0900
From: Vishnu Sankar <vishnuocv@...il.com>
To: Pali Rohár <pali@...nel.org>
Cc: Mark Pearson <mpearson-lenovo@...ebb.ca>, Dmitry Torokhov <dmitry.torokhov@...il.com>, 
	Henrique de Moraes Holschuh <hmh@....eng.br>, hansg@...nel.org, 
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>, 
	tglx@...utronix.de, mingo@...nel.org, jon_xie@...art.com, jay_lee@...art.com, 
	zhoubinbin@...ngson.cn, linux-input@...r.kernel.org, 
	linux-kernel@...r.kernel.org, ibm-acpi-devel@...ts.sourceforge.net, 
	"platform-driver-x86@...r.kernel.org" <platform-driver-x86@...r.kernel.org>, Vishnu Sankar <vsankar@...ovo.com>
Subject: Re: [PATCH] x86/Mouse: thinkpad_acpi/Trackpoint: Trackpoint Doubletap handling

Hi Pali,

On Mon, Jun 30, 2025 at 5:51 AM Pali Rohár <pali@...nel.org> wrote:
>
> On Monday 30 June 2025 05:42:45 Mark Pearson wrote:
> > Hi Dmitry,
> >
> > On Fri, Jun 27, 2025, at 2:14 PM, Dmitry Torokhov wrote:
> > > Hi Vishnu,
> > >
> > > On Fri, Jun 20, 2025 at 09:42:08AM +0900, Vishnu Sankar wrote:
> > >> Newer ThinkPads have a doubletap feature that needs to be turned
> > >> ON/OFF via the trackpoint registers.
> > >> Systems released from 2023 have doubletap disabled by default and
> > >> need the feature enabling to be useful.
> > >>
> > >> This patch introduces support for exposing and controlling the
> > >> trackpoint doubletap feature via a sysfs attribute.
> > >> /sys/devices/platform/thinkpad_acpi/tp_doubletap
> > >> This can be toggled by an "enable" or a "disable".
> > >>
> > >> With this implemented we can remove the masking of events, and rely on
> > >> HW control instead, when the feature is disabled.
> > >>
> > >> Note - Early Thinkpads (pre 2015) used the same register for hysteris
> > >> control, Check the FW IDs to make sure these are not affected.
> > >>
> > >> trackpoint.h is moved to linux/input/.
> > >
> > > No, please keep everything private to trackpoint.c and do not involve
> > > thinkpad_acpi driver. By doing so you are introducing unwanted
> > > dependencies (for both module loading, driver initialization, and
> > > operation) and unsafe use of non-owned pointers/dangling pointers, etc.
> > >
> >
> > Do you have recommendations on how to handle this case then?
> >
> > This is a Thinkpad specific feature and hence the logic for involving thinkpad_acpi. There are Thinkpad hotkeys that will enable/disable the trackpoint doubletap feature - so there is some linkage. I'm not sure how to avoid that.
> >
> > Is there a cleaner way to do this that you'd recommend we look at using? It's a feature (albeit a minor one) on the laptops that we'd like to make available to Linux users.
> >
> > Mark
>
> Hello, I do not know what is doubletap and patch description does not
> explain it. But for laptop / mouse interface, I'm just giving example
> that dell-laptop.c for some particular laptop can enable/disable
> touchpad led and uses PS/2 interface for it. See touchpad_led_init().
> I do not know if it is ideal or preferred solution, just writing to let
> you know, maybe it can be useful.

FYR, please find the previous commits regarding Doubletap support for
Trackpoint below:

https://github.com/torvalds/linux/commit/a9b0b1ee59a79d0d3853cba9a4b7376ea15be21f
https://github.com/torvalds/linux/commit/fd1e3344d13f1eedb862804dd1d2d5e184cf8eae

Sorry if details are missing in the commit. I can add those.

To be more precise, Thinkpad_acpi handles hotkeys, including Fn+G for doubletap.
To make that work, we need an integration point.

Thinkpad_acpi.c
Fn + G Hotkey - Enable/Disable the Trackpoint Double Tap.
DoubleTap on Trackpoint - Generates a DoubleTap ACPI Event

trackpoint.c
Enable/Disable the Doubletap functionality

To enable (this is decided based on Fn + G toggle key) the Trackpoint
Doubletap, we need to write to the Trackpoint extended register.
Therefore, the event to enable or disable the double tap will be
handled inside Thinkpad_acpi, but the actual write to the register is
in trackpoint.c.

I will check dell-laptop.c to understand the LED handling.

-- 

Regards,

      Vishnu Sankar
     +817015150407 (Japan)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ