public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergio Melas <sergiomelas@gmail.com>
To: linux-hwmon@vger.kernel.org, groeck@gmail.com, sergiomelas@gmail.com
Cc: platform-driver-x86@vger.kernel.org, jdelvare@suse.com
Subject: [PATCH 0/1]
Date: Thu, 19 Mar 2026 14:29:19 +0100	[thread overview]
Message-ID: <20260319132920.275755-1-sergiomelas@gmail.com> (raw)

This patch introduces a new driver for Lenovo Yoga, Legion, and IdeaPad
laptops that report fan speeds via ACPI.

The driver addresses the "jumpy" and low-resolution RPM data common in
Lenovo Embedded Controllers by implementing a passive First-Order Lag
filter with slew-rate limiting (RLLag).

Technical Validation:
- Verified via physical tachometer and FOPTD (First-Order Plus Time Delay)
  identification to ensure the filter constant (TAU_MS) matches hardware inertia.
- Stress-tested through multiple S3 (Suspend) and S4 (Hibernate) cycles.
- Verified 0.0% memory drift over 4+ hours of active monitoring.
- Compatible with KDE Plasma 6 System Monitor and standard hwmon tools.

The implementation is "passive," calculating filter state transitions 
only upon userspace read requests. This ensures physical model consistency 
without the power overhead of background kernel threads.

Changes since v1:
- Updated MODULE_LICENSE to "GPL".
- Removed background worker/kthread; implemented a passive update strategy.
- Added Documentation/hwmon/yoga_fan.rst.
- Added universal ACPI path probing for up to 8 fans (FANS, FA2S, FAN0).

Sergio Melas (1):
  hwmon: (yogafan) Add universal Lenovo Yoga/Legion fan driver

 Documentation/hwmon/yoga_fan.rst    |  36 +++++
 auto_compile_rust_lenovo_drivers.sh | 196 -----------------------
 drivers/hwmon/Kconfig               |  14 ++
 drivers/hwmon/Makefile              |   1 +
 drivers/hwmon/yoga_fan.c            | 237 ++++++++++++++++++++++++++++
 5 files changed, 288 insertions(+), 196 deletions(-)
 create mode 100644 Documentation/hwmon/yoga_fan.rst
 delete mode 100755 auto_compile_rust_lenovo_drivers.sh
 create mode 100644 drivers/hwmon/yoga_fan.c

-- 
2.53.0


             reply	other threads:[~2026-03-19 13:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 13:29 Sergio Melas [this message]
2026-03-19 13:29 ` [PATCH 1/1] hwmon: (yogafan) Add universal Lenovo Yoga/Legion fan driver Sergio Melas
2026-03-19 15:59   ` Guenter Roeck
2026-03-19 17:03     ` Guenter Roeck
2026-03-19 19:37 ` [PATCH 0/1] Guenter Roeck

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=20260319132920.275755-1-sergiomelas@gmail.com \
    --to=sergiomelas@gmail.com \
    --cc=groeck@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=platform-driver-x86@vger.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