mbox series

[0/2] platform/x86: Add driver for Yoga Tablet mode switch

Message ID 20230310041726.217447-1-kallmeyeras@gmail.com (mailing list archive)
Headers show
Series platform/x86: Add driver for Yoga Tablet mode switch | expand


Andrew Kallmeyer March 10, 2023, 4:17 a.m. UTC
This driver maps the Lenovo Yoga tablet mode switch to a SW_TABLET_MODE input
device. This will make the tablet status available to desktop environments.

This patch series is the result of the discussion at

I decided to follow-up on the patch Gergo wrote and respond to the review
comments to get it merged and available for everyone.

As Gergo said: It should work with  models like the Yoga C940, Ideapad
flex 14API, Yoga 9 14IAP7, Yoga 7 14ARB7.
The 14ARB7 model must trigger the EC to send mode change events. This
might be a firmware bug.

I have additionally tested this on the Yoga 7 14IAL7.

Andrew Kallmeyer (1):
  platform/x86: Move ideapad ACPI helpers to a new header

Gergo Koteles (1):
  platform/x86: Add driver for Yoga Tablet Mode switch

 drivers/platform/x86/Kconfig          |  10 ++
 drivers/platform/x86/Makefile         |   1 +
 drivers/platform/x86/ideapad-laptop.c | 135 +-------------------
 drivers/platform/x86/ideapad-laptop.h | 152 ++++++++++++++++++++++
 drivers/platform/x86/lenovo-ymc.c     | 177 ++++++++++++++++++++++++++
 5 files changed, 341 insertions(+), 134 deletions(-)
 create mode 100644 drivers/platform/x86/ideapad-laptop.h
 create mode 100644 drivers/platform/x86/lenovo-ymc.c