Linux Input Archive mirror
 help / color / mirror / Atom feed
From: "Guido Günther" <agx@sigxcpu.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Hermes Zhang <chenhuiz@axis.com>,
	Tony Lindgren <tony@atomide.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	phone-devel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] Input: gpio-keys - expose wakeup keys in sysfs
Date: Tue, 14 May 2024 18:05:20 +0200	[thread overview]
Message-ID: <ZkOLwIEuZ8hfzO4M@qwark.sigxcpu.org> (raw)
In-Reply-To: <ZkKQoTq2xyNvJlHE@google.com>

Hi,
On Mon, May 13, 2024 at 03:13:53PM -0700, Dmitry Torokhov wrote:
> Hi Guido,
> 
> On Thu, May 09, 2024 at 02:00:28PM +0200, Guido Günther wrote:
> > This helps user space to figure out which keys should be used to unidle a
> > device. E.g on phones the volume rocker should usually not unblank the
> > screen.
> 
> How exactly this is supposed to be used? We have "disabled" keys and
> switches attribute because this function can be controlled at runtime
> from userspace while wakeup control is a static device setting.

Current Linux userspace usually unblanks/unidles a device on every
keypress. That is usually not the expected result on phones where often
only the power button and e.g. some home buttons should do this.

These keys usually match the keys that are used as wakeup sources to
bring a device out of suspend. So if we export the wakeup keys to
userspace we can pick some sensible defaults (overridable via hwdb¹).

> Kernel also does not really know if the screen should be unblanked or
> not, if a button or switch is configured for wake up the kernel will go
> through wakeup process all the same and then userspace can decide if it
> should stay woken up or not.

Yes, we merely want that as a hint to figure out sensible defaults in
userspace (which might be a subset of the wakeup keys).

Cherrs,
 -- Guido

¹) See https://gitlab.gnome.org/World/Phosh/gmobile/-/blob/main/data/61-gmobile-wakeup.hwdb?ref_type=heads#L57-L59

> 
> Thanks.
> 
> -- 
> Dmitry
> 

      reply	other threads:[~2024-05-14 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1715255980.git.agx@sigxcpu.org>
2024-05-09 12:00 ` [PATCH v1 1/1] Input: gpio-keys - expose wakeup keys in sysfs Guido Günther
2024-05-13 12:35   ` Geert Uytterhoeven
2024-05-13 22:13   ` Dmitry Torokhov
2024-05-14 16:05     ` Guido Günther [this message]

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=ZkOLwIEuZ8hfzO4M@qwark.sigxcpu.org \
    --to=agx@sigxcpu.org \
    --cc=chenhuiz@axis.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=tony@atomide.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).