Linux Input/HID development
 help / color / mirror / Atom feed
* Double tap to wake optionality
@ 2026-09-06 22:02 David Heidelberg
  2026-09-13 23:33 ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: David Heidelberg @ 2026-09-06 22:02 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input

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


Thanks
David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Double tap to wake optionality
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2026-09-13 23:33 UTC (permalink / raw)
  To: David Heidelberg; +Cc: linux-input

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.

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

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Double tap to wake optionality
  2026-09-13 23:33 ` Dmitry Torokhov
@ 2026-09-21 11:19   ` David Heidelberg
  2026-09-21 16:20     ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: David Heidelberg @ 2026-09-21 11:19 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input

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.
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Double tap to wake optionality
  2026-09-21 11:19   ` David Heidelberg
@ 2026-09-21 16:20     ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2026-09-21 16:20 UTC (permalink / raw)
  To: David Heidelberg; +Cc: linux-input

On Mon, Sep 21, 2026 at 01:19:15PM +0200, David Heidelberg wrote:
> 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.

I think this is the "follower" model - a touch controller integrated
into a panel that is being powered down together with it. There was a
patchset [1] in the last couple of weeks but I have not had a chance to
look at it yet...

[1] https://lore.kernel.org/all/20260911133234.736A21F000FF@smtp.kernel.org/

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-21 16:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-09-21 16:20     ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox