All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Oleg Keri <okerixx@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Hans de Goede <hansg@kernel.org>,
	 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>,
	 linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org,
	 linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v6 2/3] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver
Date: Wed, 14 Oct 2026 17:00:03 +0300 (EEST)	[thread overview]
Message-ID: <3df5fce1-509b-1362-3b78-8f79337ebc05@linux.intel.com> (raw)
In-Reply-To: <20261014132315.4659-3-okerixx@gmail.com>

On Wed, 14 Oct 2026, Oleg Keri wrote:

> The Lenovo Yoga Slim 7x Gen 11 (Qualcomm glymur / Snapdragon X2 Elite)
> carries a Compal EF06 embedded controller on I2C at address 0x70. The
> platform firmware describes it as an ACPI GenericSerialBus region, but the
> machine boots from device tree, so nothing otherwise talks to it.
> 
> Commands are exchanged with two raw I2C block transfers: a 7 byte write to
> register 0x02 carrying the command and up to six arguments, then a 6 byte
> read of register 0x01 for the result, with a short delay in between before
> the result register is valid. The EC offers no way to match a result to
> its command; the delay is the one the vendor ACPI code uses.
> 
> Expose what the EC offers that the rest of the kernel does not already
> provide:
> 
>   - the board thermistors that report a value at probe, five on this
>     machine, as hwmon temperature channels. These are charger, CPU
>     voltage regulator, 5 V rail and ambient sensors, not die sensors, and
>     read considerably cooler than tsens
>   - CPU fan speed in RPM
>   - the keyboard backlight as an LED, off/low/high
>   - Fn-lock as a read/write sysfs attribute, matching the ideapad-laptop
>     interface. The EC reports Fn+Esc as an event but keeps no state of its
>     own, so the driver owns the bit and toggles it on the key
>   - the mic-mute and airplane-mode keys as KEY_MICMUTE and KEY_RFKILL.
>     These reach the host only as EC events; they are not on the keyboard's
>     HID interface and have no GPIO of their own
> 
> The EC signals pending events on a dedicated line, and keeps pulsing it
> until they are read - so the queue must be drained completely on every
> interrupt, including codes this driver ignores. Leaving one behind makes
> the controller pulse indefinitely.
> 
> Fan speed is reported but not controlled. The EC accepts a manual setpoint,
> however it enforces no thermal floor over it: with the fan pinned at
> roughly 2000 RPM under full load the SoC rose from 69 to 91 degrees in 30
> seconds without the EC ever overriding. Exposing pwm1_enable or fan1_target
> would therefore let userspace overheat the machine, so neither is
> implemented.
> 
> Note this is the Gen 11 machine specifically. Its EC differs from the
> Qualcomm reference EC that the reference designs place at address 0x76,
> which is not populated here, and so EC_QCOM_HAMOA does not drive it.
> 
> Signed-off-by: Oleg Keri <okerixx@gmail.com>
> ---

> +static const struct of_device_id slim7x11_ec_of_match[] = {
> +	{ .compatible = "lenovo,yoga-slim7x-gen11-ec" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, slim7x11_ec_of_match);
> +
> +static const struct i2c_device_id slim7x11_ec_i2c_id[] = {
> +	{ "slim7x-gen11-ec" },

Thanks for the update. I've applied patch 2 to the review-ilpo-next branch 
in the platform drivers (pdx86) tree.

The other two patches will need to go through some other tree.

While applying, I added .name = into that id struct.


--
 i.

  parent reply	other threads:[~2026-10-14 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 13:23 [PATCH v6 0/3] platform/arm64: Lenovo Yoga Slim 7x Gen 11 embedded controller Oleg Keri
2026-10-14 13:23 ` [PATCH v6 1/3] dt-bindings: embedded-controller: add Lenovo Yoga Slim 7x Gen 11 EC Oleg Keri
2026-10-14 13:27   ` sashiko-bot
2026-10-14 13:23 ` [PATCH v6 2/3] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver Oleg Keri
2026-10-14 13:29   ` sashiko-bot
2026-10-14 14:00   ` Ilpo Järvinen [this message]
2026-10-14 13:23 ` [PATCH v6 3/3] arm64: dts: qcom: glymur-lenovo-yoga-slim7x: add the embedded controller Oleg Keri
2026-10-14 13:25   ` sashiko-bot

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=3df5fce1-509b-1362-3b78-8f79337ebc05@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.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=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=okerixx@gmail.com \
    --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 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.