From: Oleg Keri <okerixx@gmail.com>
To: "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"Guenter Roeck" <linux@roeck-us.net>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Abel Vesa" <abelvesa@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org
Subject: [PATCH v5 0/3] platform/arm64: Lenovo Yoga Slim 7x Gen 11 embedded controller
Date: Sat, 3 Oct 2026 22:21:40 +0200 [thread overview]
Message-ID: <20261003202143.4697-1-okerixx@gmail.com> (raw)
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 fan tachometer, the keyboard backlight, Fn-lock, 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 v5:
- Patch 2: drop the battery cell voltages. They live in an EC bank shared
with other EC activity, and 43-79% of reads failed the signature check
across runs; retries, a cache and a stale window only hid that.
- Patch 2: fn_lock had the polarity inverted: 1 left the multimedia keys
primary and the Fn-lock LED off. SCUK bit 7 selects the multimedia keys
and bit 5 turns the LED off, as the vendor ACPI FNUS method reports it;
1 now means F1..F12, as documented and as in ideapad-laptop.
- Patch 2: FIELD_MODIFY() for the backlight level; notify fn_lock when
the EC toggles it on Fn+Esc; Kconfig help updated; the ABI entry dated
October 2026 for 7.5.
- Patch 3: pick up Reviewed-by from Konrad and Abel.
- Link to v4: https://lore.kernel.org/all/20260922165737.260443-1-okerixx@gmail.com/
Changes in v4:
- Patch 2, after Ilpo's review: the missing includes added where the
symbols are used; the cache and stale periods defined in milliseconds
with the unit in the name and converted to jiffies at the call;
lockdep_assert_held() in the command path every EC access goes
through; each EC read checked right after the call; ARRAY_SIZE() for
the cell loop; MILLIDEGREE_PER_DEGREE from units.h; braces on the
multi-line returns; the ABI entry dated September 2026 for 7.4.
- Patch 2: the i2c id was 20 characters, the size of i2c_device_id.name,
leaving no room for the terminator; now "slim7x-gen11-ec".
- Patch 2: symbol prefix renamed from yoga_ec to slim7x11_ec, naming the
machine like the driver does. No user-visible name changes.
- Link to v3: https://lore.kernel.org/all/20260921144953.15113-1-okerixx@gmail.com/
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@gmail.com/
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@baylibre.com>
- 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@gmail.com/
[1] https://lore.kernel.org/all/20260914082950.9393-1-okerixx@gmail.com/
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 | 22 +
.../lenovo,yoga-slim7x-gen11-ec.yaml | 56 ++
MAINTAINERS | 8 +
.../dts/qcom/glymur-lenovo-yoga-slim7x.dts | 12 +-
drivers/platform/arm64/Kconfig | 23 +
drivers/platform/arm64/Makefile | 1 +
.../arm64/lenovo-yoga-slim7x-gen11-ec.c | 547 ++++++++++++++++++
7 files changed, 667 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
base-commit: f0406245cb9855e6318335a8a223551354291a46
--
2.55.0
next reply other threads:[~2026-10-03 20:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 20:21 Oleg Keri [this message]
2026-10-03 20:21 ` [PATCH v5 1/3] dt-bindings: embedded-controller: add Lenovo Yoga Slim 7x Gen 11 EC Oleg Keri
2026-10-03 20:21 ` [PATCH v5 2/3] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver Oleg Keri
2026-10-03 20:21 ` [PATCH v5 3/3] arm64: dts: qcom: glymur-lenovo-yoga-slim7x: add the embedded controller Oleg Keri
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=20261003202143.4697-1-okerixx@gmail.com \
--to=okerixx@gmail.com \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®