mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Lenovo ThinkPad X13s embedded controller support
@ 2026-09-29 19:29 Alex Robinson
  2026-09-29 19:29 ` [PATCH v4 1/3] dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC Alex Robinson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alex Robinson @ 2026-09-29 19:29 UTC (permalink / raw)
  To: Hans de Goede, Ilpo Järvinen
  Cc: Bryan O'Donoghue, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Steev Klimaszewski,
	platform-driver-x86, linux-arm-msm, devicetree, linux-kernel

Add Device Tree support for the ThinkPad X13s embedded controller,
providing keyboard-backlight control and firmware-driven brightness
notifications. Its event, backlight and power-management interfaces
differ from the T14s EC and require a separate driver.

EC wakeup remains disabled by default because lid closure can trigger
an unwanted wakeup and no selective event mask is known. Userspace can
enable wakeup when desired. Other EC event mappings remain outside the
scope of this series.

This follows earlier X13s EC work by Konrad Dybcio and Steev Klimaszewski.
Development was assisted by an LLM, including analysis of the X13s ACPI
DSDT and review of the implementation.

Changes in v4:
- Set GPIO103 bias-pull-up explicitly, based on its firmware-inherited
  configuration measured at pinctrl probe before Linux claimed or
  configured the pin. CTL offset 0x67000 read 0x00000003 (pull field 3).
  The temporary measurement instrumentation is not included.
- Remove output-high from the GPIO176 pinctrl state. The driver already
  requests GPIOD_OUT_HIGH at probe and controls the line during sleep.
- Restore the suspend brightness snapshot only if it was successfully
  captured during that suspend, avoiding restoration of a stale value.
- Use FIELD_MODIFY(), validate brightness against the LED maximum, and
  simplify transfer error handling and selected mutex-protected paths.
- Include linux/ratelimit.h explicitly and adjust conditional formatting.
- Shorten commit messages to focus on rationale rather than the diff.

Changes in v3:
- Disable EC wakeup by default without disabling runtime IRQ handling.
- Retain wakeup-source as a description of hardware capability.
- Remove the Kconfig help text's claim of wake support.

Changes in v2:
- Make backlight snapshots and EC power-management operations best-effort.
- Save firmware- and software-selected brightness in the EC and restore
  the EC-saved brightness on lid open.
- Process deferred events after the normal resume brightness restore.
- Add QUP8 pin configuration verified on hardware and fix DT node ordering.

Testing:
- Confirmed GPIO103's firmware-inherited pull-up on a ThinkPad X13s using
  a vanilla kernel with temporary probe-time instrumentation.
- Verified that all three v4 patches apply in order to Linux v7.3-rc4
  without the separate PCI workaround.
- Earlier v2 hardware testing covered keyboard-backlight control,
  firmware brightness changes, s2idle, lid-close/open brightness
  restoration, and EC wake events. Those results are historical and do
  not establish validation of the complete v4 series or default-off
  wakeup policy. Full v4 build and runtime validation remain outstanding.

Earlier series:
https://lore.kernel.org/all/20260925215358.33417-1-alex@ironrobin.net/

Alex Robinson (3):
  dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC
  platform: arm64: Add Lenovo ThinkPad X13s EC driver
  arm64: dts: qcom: sc8280xp-x13s: Add embedded controller

base-commit: 93f51579e7df248780214094418f205253383cc5


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-30  6:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 19:29 [PATCH v4 0/3] Lenovo ThinkPad X13s embedded controller support Alex Robinson
2026-09-29 19:29 ` [PATCH v4 1/3] dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC Alex Robinson
2026-09-29 19:29 ` [PATCH v4 2/3] platform: arm64: Add Lenovo ThinkPad X13s EC driver Alex Robinson
2026-09-30  6:38   ` Ilpo Järvinen
2026-09-29 19:29 ` [PATCH v4 3/3] arm64: dts: qcom: sc8280xp-x13s: Add embedded controller Alex Robinson

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®