public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Krishna Chomal <krishna.chomal108@gmail.com>
To: ilpo.jarvinen@linux.intel.com, hansg@kernel.org, linux@roeck-us.net
Cc: platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Krishna Chomal <krishna.chomal108@gmail.com>
Subject: [PATCH v3 0/3] platform/x86: hp-wmi: Add manual fan support for Victus S laptops
Date: Tue, 13 Jan 2026 18:07:35 +0530	[thread overview]
Message-ID: <20260113123738.222244-1-krishna.chomal108@gmail.com> (raw)
In-Reply-To: <20251230145053.516196-1-krishna.chomal108@gmail.com>

This series adds support for manual fan speed control and PWM reporting
for HP Victus S-style laptops.

The first patch is a trivial fix for ordering the include headers.

The second patch refactors the hwmon implementation to use a per-device
private context for state tracking. It implements RPM-to-PWM conversion
using linear interpolation based on the laptop's internal fan tables
retrieved via WMI. It also introduces PWM_MODE_MANUAL, allowing users
to set specific fan speeds.

The third patch addresses a firmware-specific behavior where the
system reverts to "Auto" fan mode after a 120-second timeout if no WMI
fan commands are received. A delayed workqueue is implemented to act
as a keep-alive heartbeat, refreshing the fan state every 90 seconds
to ensure user-selected profiles remain active indefinitely.

Changes in v3:
- Added a new patch (1/3) to sort include headers alphabetically.
- Fixed alignment of multi-line function arguments.
- Refactored GPU fan speed calculation to use signed integers.
- Removed intermediate "ret" variables in hwmon read/write functions.
- Capitalized "PWM" in comments for consistency.
- Renamed "ctx" to "priv" for drvdata throughout the series.
Changes in v2:
- Refactored hp_wmi_apply_fan_settings() to use a "ret" variable and use
  a common path to set fan settings and prepare for keep-alive logic.
- Replaced raw buffer casting with proper fan table structs.
- Converted RPM/PWM macros to static inline functions.
- Renamed internal context variable from "ctx" to "priv" for consistency.
- Renamed delay macro to KEEP_ALIVE_DELAY_SECS.
- Added missing headers and removed redundant NULL checks.

Krishna Chomal (3):
  platform/x86: hp-wmi: order include headers
  platform/x86: hp-wmi: add manual fan control for Victus S models
  platform/x86: hp-wmi: implement fan keep-alive

 drivers/platform/x86/hp/hp-wmi.c | 321 +++++++++++++++++++++++++------
 1 file changed, 266 insertions(+), 55 deletions(-)

-- 
2.52.0


  parent reply	other threads:[~2026-01-13 12:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-25 14:23 [PATCH 0/2] platform/x86: hp-wmi: Add manual fan support for Victus S laptops Krishna Chomal
2025-12-25 14:23 ` [PATCH 1/2] platform/x86: hp-wmi: add manual fan control for Victus S models Krishna Chomal
2025-12-29 13:08   ` Ilpo Järvinen
2025-12-30 14:22     ` Krishna Chomal
2025-12-25 14:23 ` [PATCH 2/2] platform/x86: hp-wmi: implement fan keep-alive Krishna Chomal
2025-12-29 13:21   ` Ilpo Järvinen
2025-12-30 14:33     ` Krishna Chomal
2025-12-30 14:50 ` [PATCH v2 0/2] platform/x86: hp-wmi: Add manual fan support for Victus S laptops Krishna Chomal
2025-12-30 14:50   ` [PATCH v2 1/2] platform/x86: hp-wmi: add manual fan control for Victus S models Krishna Chomal
2026-01-12 15:13     ` Ilpo Järvinen
2026-01-12 18:03       ` Krishna Chomal
2026-01-12 18:08         ` Ilpo Järvinen
2026-01-12 18:17           ` Krishna Chomal
2025-12-30 14:50   ` [PATCH v2 2/2] platform/x86: hp-wmi: implement fan keep-alive Krishna Chomal
2026-01-12 15:14     ` Ilpo Järvinen
2026-01-12 18:07       ` Krishna Chomal
2026-01-13 12:37   ` Krishna Chomal [this message]
2026-01-13 12:37     ` [PATCH v3 1/3] platform/x86: hp-wmi: order include headers Krishna Chomal
2026-01-13 12:37     ` [PATCH v3 2/3] platform/x86: hp-wmi: add manual fan control for Victus S models Krishna Chomal
2026-01-13 12:37     ` [PATCH v3 3/3] platform/x86: hp-wmi: implement fan keep-alive Krishna Chomal
2026-01-15 13:45     ` [PATCH v3 0/3] platform/x86: hp-wmi: Add manual fan support for Victus S laptops Ilpo Järvinen
2026-01-16 14:23       ` Krishna Chomal

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=20260113123738.222244-1-krishna.chomal108@gmail.com \
    --to=krishna.chomal108@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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