[PATCH v3 0/3] platform/arm64: Lenovo Yoga Slim 7x Gen 11 embedded controller
From: Oleg Keri
Date: Mon Sep 21 2026 - 12:24:00 EST
The Lenovo Yoga Slim 7x Gen 11 is a Qualcomm Snapdragon X2 Elite (glymur)
laptop. It carries a Compal EF06 embedded controller on I2C at address
0x70, which is the only source on this machine for the board thermistors,
the battery cell voltages, the fan tachometer, the keyboard backlight, and
the mic-mute and airplane-mode keys.
Patch 1 documents the binding, patch 2 adds the driver, patch 3 adds the
node to the board.
Why one driver
--------------
The automated review of v2 asked for the hwmon part to become an
auxiliary driver under drivers/hwmon/. The hwmon channels, the LED and
the input device all sit behind one command mailbox and one interrupt,
so the driver stays in one file, like huawei-gaokun-ec,
lenovo-thinkpad-t14s and qcom-hamoa-ec next to it. It is documented
under Documentation/ABI only.
Notes
-----
Fan speed is reported but not controlled, deliberately - the EC enforces no
thermal floor over a manual setpoint. Patch 2 has the measurement.
Tested on a Lenovo Yoga Slim 7x Gen 11 (DMI 83QR, "Yoga Slim 7 14Q8Y11").
Changes in v3:
- Add the board DT node as patch 3. It was posted on its own [1], and a
node cannot be merged before its binding (Konrad).
- Add the "Why one driver" section above.
- Patch 2: name the driver after the module, and the i2c id after the
compatible.
- Patch 2: spell out both SCUK bits the Fn-lock toggle moves instead of
the 0xa0/0x5f masks.
- Patch 2: return -ENODATA for a thermistor reading of 0, as probe already
treats 0 as "not fitted".
- Patch 2: ten tries for a cell-voltage sample instead of thirty.
- Patch 2: include what is used directly, devm_mutex_init(), comment the
mutex, fix the address in MODULE_AUTHOR, say in the commit message that
results cannot be matched to commands.
- Link to v2: https://lore.kernel.org/all/20260908183403.2107-1-okerixx@xxxxxxxxx/
Changes in v2:
- Patch 2: drop #include <linux/mod_devicetable.h>; <linux/i2c.h> already
provides both of_device_id (via linux/of.h) and i2c_device_id (via
linux/device-id/i2c.h), and the header is on its way out.
Reported-by: Uwe Kleine-Koenig <u.kleine-koenig@xxxxxxxxxxxx>
- Patch 2: add "depends on INPUT" to EC_LENOVO_YOGA_SLIM7X_GEN11; the driver
registers an input device unconditionally, so a config with INPUT=n did
not link.
- Patch 1: pick up Conor Dooley's Acked-by.
- Link to v1: https://lore.kernel.org/all/20260908091752.5508-1-okerixx@xxxxxxxxx/
[1] https://lore.kernel.org/all/20260914082950.9393-1-okerixx@xxxxxxxxx/
Oleg Keri (3):
dt-bindings: embedded-controller: add Lenovo Yoga Slim 7x Gen 11 EC
platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver
arm64: dts: qcom: glymur-lenovo-yoga-slim7x: add the embedded controller
.../sysfs-driver-lenovo-yoga-slim7x-gen11-ec | 21 +
.../lenovo,yoga-slim7x-gen11-ec.yaml | 56 ++
MAINTAINERS | 8 +
.../boot/dts/qcom/glymur-lenovo-yoga-slim7x.dts | 12 +-
drivers/platform/arm64/Kconfig | 23 +
drivers/platform/arm64/Makefile | 1 +
.../platform/arm64/lenovo-yoga-slim7x-gen11-ec.c | 653 +++++++++++++++++++++
7 files changed, 772 insertions(+), 2 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-driver-lenovo-yoga-slim7x-gen11-ec
create mode 100644 Documentation/devicetree/bindings/embedded-controller/lenovo,yoga-slim7x-gen11-ec.yaml
create mode 100644 drivers/platform/arm64/lenovo-yoga-slim7x-gen11-ec.c
--
2.55.0