Linux Input/HID development
 help / color / mirror / Atom feed
From: David Heidelberg <david@ixit.cz>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: Double tap to wake optionality
Date: Mon, 21 Sep 2026 13:19:15 +0200	[thread overview]
Message-ID: <2e1d1610-1d16-434d-82aa-54289ffd0eb1@ixit.cz> (raw)
In-Reply-To: <aqcxlFLHh3V5vQvt@google.com>

On 14/09/2026 01:33, Dmitry Torokhov wrote:
> Hi David,
> 
> On Mon, Sep 07, 2026 at 12:02:12AM +0200, David Heidelberg wrote:
>> Hello!
>>
>> Most of touchscreens has ability to jump into low power mode and get woken
>> up by gesture (such as double tap).
>>
>> I wonder about suggestion what property should drivers use to implement this
>> policy where driver doesn't have to jump into low-power mode but completely
>> power-off (and save battery). My thinking was something such as
>>
>> /sys/class/input/inputX/gesture_to_wake
>> (while gesture sounds a bit weird, it seems that TS are capable to recognize
>> different patterns, not only double-tap).
>>
>>
>>                      userspace
>>                         │
>>                         │ gesture_to_wake = 1
>>                         ▼
>>                touchscreen driver
>>                         │
>>            ┌────────────┴────────────┐
>>            │                         │
>>         gesture ON               gesture OFF
>>            │                         │
>>            ▼                         ▼
>>     low-power TS mode          complete power-off
>>            │
>>            ▼
>>       IRQ configured
>>       as wake source
> 
> How is it different from the power/wakeup device attribute? Device's
> suspend  routines check device_may_wakeup() and then either completely
> power off controllers or configure them for wake up.

Hi Dmitry.

You're right. I tried to experiment with tap to wake and in general I it's as 
you say.

No need for extra option, so far I do something like:

    wakeup-source;

    event-tap-double {
            linux,code = <KEY_WAKEUP>;
    };

and adding another gesture_input device to the existing input. Then send all 
these events to the gesture_input when the main touchscreen is no longer active.

Some of the thoughts are here:

https://gitlab.gnome.org/World/Phosh/meta-phosh/-/work_items/43

Thanks
David

P.S. There was some discussion in the ML about letting panel blank and 
toucscreehn interact, but I cannot find it.

Having the handling of the panel off -> TS autosuspend workflow in the kernel 
would be pretty nice.

> 
> How exactly wakeup is handled - any touch, or double-tap, or something
> else - is up to the controller and its firmware.
> 
> Thanks.
> 


  reply	other threads:[~2026-09-21 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 22:02 Double tap to wake optionality David Heidelberg
2026-09-13 23:33 ` Dmitry Torokhov
2026-09-21 11:19   ` David Heidelberg [this message]
2026-09-21 16:20     ` Dmitry Torokhov

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=2e1d1610-1d16-434d-82aa-54289ffd0eb1@ixit.cz \
    --to=david@ixit.cz \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@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