All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Kallmeyer <kallmeyeras@gmail.com>
To: platform-driver-x86@vger.kernel.org
Subject: ideapad_laptop tablet mode toggle detection
Date: Tue, 28 Feb 2023 20:45:35 -0800	[thread overview]
Message-ID: <CAG4kvq9US=-NjyXFMzJYu2zCJryJWtOc7FGZbrewpgCDjdAkbg@mail.gmail.com> (raw)

Hello, I'm interested in detecting tablet mode switching for my Lenovo
Yoga laptop properly in the kernel. Ultimately I'd like to provide the
SW_TABLET_MODE input event.

I have found that there are ACPI events fired when the tablet mode is
toggled (both directions send the same event). Here are the logs:

kernel: ACPI BIOS Error (bug): Could not resolve symbol
[\_SB.PC00.LPCB.EC0._Q44.WM00], AE_NOT_FOUND (20221020/psargs-330)
kernel: ACPI Error: Aborting method \_SB.PC00.LPCB.EC0._Q44 due to
previous error (AE_NOT_FOUND) (20221020/psparse-529)
root[10258]: ACPI group/action undefined: 06129D99-6083- / 000000d0

When I looked at the code I found TP_HKEY_EV_TABLET_CHANGED in the
thinkpad_acpi.c driver which seems to have exactly the behavior I'm
looking for but with a different ACPI event number. Would it be
possible to do something like this in the ideapad_laptop driver?

             reply	other threads:[~2023-03-01  4:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  4:45 Andrew Kallmeyer [this message]
2023-03-04  5:46 ` ideapad_laptop tablet mode toggle detection Andrew Kallmeyer
2023-03-04 20:14   ` Maximilian Luz
2023-03-04 21:37     ` Armin Wolf
2023-03-05  5:42       ` Andrew Kallmeyer
2023-03-05 21:40         ` Armin Wolf
2023-03-05 22:59           ` Andrew Kallmeyer
2023-03-06  1:26             ` Armin Wolf
2023-03-06  1:41               ` Andrew Kallmeyer
2023-03-06  1:58                 ` Armin Wolf
2023-03-06  1:41               ` Armin Wolf
2023-03-06  8:38                 ` Hans de Goede
2023-03-08  5:14                   ` Andrew Kallmeyer
2023-03-08  5:21                     ` Andrew Kallmeyer
2023-03-08 10:13                     ` Hans de Goede

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='CAG4kvq9US=-NjyXFMzJYu2zCJryJWtOc7FGZbrewpgCDjdAkbg@mail.gmail.com' \
    --to=kallmeyeras@gmail.com \
    --cc=platform-driver-x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.