From: Werner Sembach <wse@tuxedocomputers.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Disable touchpad on firmware level while not in use
Date: Tue, 4 Mar 2025 13:14:26 +0100 [thread overview]
Message-ID: <df09a3f9-6131-435a-ad68-4cea71237e42@tuxedocomputers.com> (raw)
In-Reply-To: <20250211133950.422232-2-wse@tuxedocomputers.com>
Hi,
Am 11.02.25 um 14:39 schrieb Werner Sembach:
> Using the new on_hid_hw_open and on_hid_hw_close functions to disable the
> touchpad on firmware level while not being in use.
>
> This safes some battery and triggers touchpad-disabled-leds hardwired to
> the touchpads firmware, that exist for example on some TongFang barebones.
>
> For a lengthy discussion with all the details see
> https://gitlab.freedesktop.org/libinput/libinput/-/issues/558
Any comments if this is a good idea or not?
Best regards,
Werner
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> ---
> drivers/hid/hid-multitouch.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 82900857bfd87..7289c04f47f17 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -1884,6 +1884,16 @@ static void mt_remove(struct hid_device *hdev)
> hid_hw_stop(hdev);
> }
>
> +static void mt_on_hid_hw_open(struct hid_device *hdev)
> +{
> + mt_set_modes(hdev, HID_LATENCY_NORMAL, TOUCHPAD_REPORT_ALL);
> +}
> +
> +static void mt_on_hid_hw_close(struct hid_device *hdev)
> +{
> + mt_set_modes(hdev, HID_LATENCY_HIGH, TOUCHPAD_REPORT_NONE);
> +}
> +
> /*
> * This list contains only:
> * - VID/PID of products not working with the default multitouch handling
> @@ -2351,5 +2361,7 @@ static struct hid_driver mt_driver = {
> .suspend = pm_ptr(mt_suspend),
> .reset_resume = pm_ptr(mt_reset_resume),
> .resume = pm_ptr(mt_resume),
> + .on_hid_hw_open = mt_on_hid_hw_open,
> + .on_hid_hw_close = mt_on_hid_hw_close,
> };
> module_hid_driver(mt_driver);
next prev parent reply other threads:[~2025-03-04 12:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 13:39 [PATCH 1/2] Add functions for HID drivers to react on first open and last close call Werner Sembach
2025-02-11 13:39 ` [PATCH 2/2] Disable touchpad on firmware level while not in use Werner Sembach
2025-03-04 12:14 ` Werner Sembach [this message]
2025-04-24 9:20 ` Jiri Kosina
2025-04-24 10:58 ` Werner Sembach
2025-05-13 16:39 ` Benjamin Tissoires
2025-05-13 16:36 ` [PATCH 1/2] Add functions for HID drivers to react on first open and last close call 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=df09a3f9-6131-435a-ad68-4cea71237e42@tuxedocomputers.com \
--to=wse@tuxedocomputers.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®