From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3435038F941 for ; Tue, 13 Jan 2026 12:37:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768307869; cv=none; b=d44JqvEXiDyXj2YbQPgkXhNMWrjNdUGGik/sc2sK/tvDYdKxGXaMCJC6bUKPxeD7Nkkka2heG2VMQDUeTBbqq8m6Pb9kOaLVLhB9uVytj2mu7etjlugun+zpNOIoTXO04QIq0lcxapeCCMEI1hiw6mhOGBE3nRWjJLxUgcjchVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768307869; c=relaxed/simple; bh=N5hJVbraTn9SX38FctttkE7Aunax7JtiyP45LDytGNM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eEZPfGGGvokixkhsjsYkMZ9DHirjcUvqC0veZ6qdWyGD9Ao4YV2Y9IywJW7qNNn7iSzieEn2Xr0BUAgsKvS4NsnWg+y+/Kv8wO16Kcjc0YEKjGX6bGvCShue8YW2E1YQbBFJgM7GC6YYfkPjyvPbKvn6451ZyuLv5KD4wxRDfls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z5JehJ1N; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z5JehJ1N" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-81e821c3d4eso3164162b3a.3 for ; Tue, 13 Jan 2026 04:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768307866; x=1768912666; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R4+dGJCJp7B1U84LZRTKPB2JbVsYeAN54NQljYdP2Mo=; b=Z5JehJ1NDf+KOZhsovsquesUmfGJbbR5kU0qZJO3HRsgHU0Aa2Ks+sb20r8Ov25VYw n5MTcxj/DcX9tw13cKTjjvozxLueJjRuAW3oEqQJHhemzAtEZ7YCE3ws3LtGtZhhJ9z4 y2gk2qgPQ4GZ1kNCByFnlUa1+Ob6+2YrIuWcdPzfvmN5jRS82c+zHObb4CL1kH14TiT4 hSvA1VMTFkWFAmwU6w0hGsmykEVfF/gX/rCpE0fToUHQnD9cP8in7+jMxFqssQzTAMYL MGj84e5t7zuvKhg922u6aeWk2io9vOjH30r/9MoY8ERjyhoy/B1xXEpy3cPL8hhn1KzQ yZjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768307866; x=1768912666; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=R4+dGJCJp7B1U84LZRTKPB2JbVsYeAN54NQljYdP2Mo=; b=qhLRVu3kiUHWUWGtWX9IEhoicGsmbTot3O1iyusFTh7ey45xsKlhAsqWfYv812CyWz Pq2M2Gi5LMjAKznNjyqJhsTwi4OYnokFHEn+WuxY7CFnMsCaiwVhmofGIJ7fvg4YY4Sm etbQNyuqqE59lxU1Ucs1wlbCCP4XbphOZqBVq7qIIjZ5ITnDC7J8GjwWsRew2E/O4ipu QXFzDQw1RJ8s20Vyik92IHQRaL2BLylTXRdgvkCTlaUeEhAnDvkxmABL+hhy+Rh0UFFr bifb6lsyi/HoPgAmMKCiI9jaPFeJesLi7In5qAVr2QoVKiNylcWCjG9msAsQIqfiOLx1 M6pA== X-Forwarded-Encrypted: i=1; AJvYcCVDuLyDLekpqWUpSmtEn9CNCX1N+e4KP1OK6PCooX8feKOEEEcYOhxCPHd4qSTHZPAj1eNIzAL48ce3dZk=@vger.kernel.org X-Gm-Message-State: AOJu0Yw1gA/ku1U2eQY30TGtuvvsTJkfgefD7mJyKR5M8cyS5XqVohjS a2JbJExRB5HLS3MVaFe0GjVAHUxqKLtMmlybC5ICgGMNJJG0P6f0iEeJdoZxCg== X-Gm-Gg: AY/fxX6qEfRfcxsQBaCYIQD/Tyge9WvR/PbkF1NptA8O0aC6epNjCcOER+6Cu0/6CvL 1MyzYcxm581YvsGqZ3aKhh5dZWWVvPgayHTRypOWmJ1UCTtzhsEkLUaOxTBaMORZE4mdQmWlGn6 F5pNE5X7QKbSLppC07vQX+9uH1varwHFxd3IQOdotoTFxQxKv3BUXdx598jj3lS8cxRhnwdRe3k HdGLk3wTY3yKjekEYiKmyfbysXFXQIUqomtkkEJuL5wQ3Arw6xe5CsYXgO+c0ViLhcgr4ZCaW4W m6aYHfUza/IZARCjnfiqt7Sk5Se2o0bYBpjF7nmrZCHfWO/oK1wch1LAKKCRqmUgV7jy1ogmPFZ 3dHWi6XXsTZfUXqhBt+SQwsanZb7CIgaqBRhQqLOXbeFrsuzUOz8s8ny9Gneq9x8ghCL8sXPAMX vV8KBMy+qe1K3T+JrUdwY= X-Google-Smtp-Source: AGHT+IFoEgWspcaV7rvaNbXOeE2jTdnMp2H9x1BoGwDEAq9YOmf8/ODZ80i/39TlFYonsmiLsEQEEA== X-Received: by 2002:a05:6a00:9092:b0:81f:3f88:89f3 with SMTP id d2e1a72fcca58-81f3f888cdbmr8953960b3a.3.1768307866445; Tue, 13 Jan 2026 04:37:46 -0800 (PST) Received: from archlinux ([2405:201:1b:225c:eb9d:1fc0:f95c:bd90]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-81e9dd8fd8dsm11409000b3a.10.2026.01.13.04.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 04:37:45 -0800 (PST) From: Krishna Chomal 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 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 Message-ID: <20260113123738.222244-1-krishna.chomal108@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251230145053.516196-1-krishna.chomal108@gmail.com> References: <20251230145053.516196-1-krishna.chomal108@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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