From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com [209.85.221.171]) (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 574274A3E for ; Thu, 15 Jan 2026 00:16:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768436194; cv=none; b=HVv6/k1qEYTpG9DQniNWSFM8htOwUjpF/m/Mnu4pTe/pRRla6iUAifq33ik2r44uc8tilOOtmetMgGEkoAKGTTE26F5mmGNAJhhfRptNGWrDgGLhd8njFp3Lp1EiyV4X7nP7/ExnI4Rljg2m71bA1rtAcpKMepvk1OYKJ7EV2tM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768436194; c=relaxed/simple; bh=88YVk0Arse2X4YXQXNzA92NXyrRoskw+Ttj51E1gjcw=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=F82PQcEYXnpxiUyrJ1b6K9N2t9+El3u/6fXEbIra85Ror6575x7V7c6VUbSJ2s65qobRlyS2y2Dly7r8wDHbUwO0kXjHNNBkdD4QI0gwP65fke85Ba8RYXGZN5ib6lcHKDrQllqoJ3yBHFIqE3cXHLT7lQbI4e/O17fMbvEXOOo= 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=NxT775v8; arc=none smtp.client-ip=209.85.221.171 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="NxT775v8" Received: by mail-vk1-f171.google.com with SMTP id 71dfb90a1353d-5634d866615so304496e0c.2 for ; Wed, 14 Jan 2026 16:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768436192; x=1769040992; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6fEHHY+TTyFzggbhkRQjVOIOgLGb+TehajDMunOamqk=; b=NxT775v8ZaSaGbMuTJZ8yoEddM1hkyI7bdUlITPeMjqdARiOnl6DEnkEAb/pt7eEbv Pt64TLYV/WtQitVhPloD/Abg3iJy/XuP+xHLHOy/ordv7ehr56JGo5XTc56y6T91AXfG lpAxAww4t+JNhCyK9+QVCK+TWi8itscbUREo8emCc+WoauWD9+DJBHlo2du0bm0yEywF pweipN46mQ1p8oNl4IkIA7cSW+B+dz+YUm02YcEdhCbLRgJhZ0JvfM7VIkJZN5nrEdkw /3SE+fkHWhMaRqWDgFDFM0FGAUmSv3kYzvNIKqHmopXzToYeuJPpGWNTI562cmTZEDXM vgtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768436192; x=1769040992; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6fEHHY+TTyFzggbhkRQjVOIOgLGb+TehajDMunOamqk=; b=cYwFGQTwM47Y/9Aauyn5QGgQTHjI+aSDH2L5CF6Zjc+KMNNDssuGEFD6MYp91iipY/ 1fGQOadsMpk1CDUOt4aoI/V2HOASYt/heLNuZbJpwCsLsKSEdJ+RiWEN1iJ9T8RSFakM ThUQmi6FQLxqkOXf6pSMG4h32x6mBkLezMBYQGZrLtYOVUtpy2iVK2UYRjskTAd8Csak 5l8KQJv7RYBeFih+URFGwKAaUYnsR3lthJS94zwUlMroSd13rAbp4TDxcVL0N8Jcsdlw fZuoHF6s4BtDaGuAEkDiyYN1C4lQpayTMEaQFR2mifNwTPqzQ4P5AkHw1cwJthbGvGiS MUPQ== X-Forwarded-Encrypted: i=1; AJvYcCVkPx8n8nZCSAZQLQRLZY+B1eu3Ng6nfjkzXco2Td49FIvtSSifZ91kgqdooU3QsS6ogF8Gzyenzq65Qsk=@vger.kernel.org X-Gm-Message-State: AOJu0YwOa4SkYjFIubAvA7Kv8bDGerwCd8u/AYYf4CV/YWZ0s3BKa/ip EropUmYAO1+96MV3Tl0KcMxvPsRiqx9d1m3GqZ0XBTinjMBvGkDvUXsS X-Gm-Gg: AY/fxX57wCz1ISnjbDji0xH5ZW2WXdpWt9S7+HTn8AKhpIc0wbZiqtXqR7svFb4tRUf RKSqgICeGVQMmQkUihSOEnPddJQAL8BLr5JZwXa8g7IvMLd3CMCaTLBfEWGNCZ5XucQOjH1JRcR tN+yA0/H+2aoG+gaGLWxDPqZn1qepcyInXcvBBb9JQR76LoGArMpdICb/Jvg7JQq3CMwiZZE5kW YpdqNHkDNPkTSJwaX3p+vNZLP358bvLQGcGygctAXdM8oweORxFLwc3xeN+1JkhhyugLY+jWAxu RNBCC3KTL5diIwFiQNN/uCoVpbA7JOUX5mdcfuVhqdRnEMMkHdLbNyZLlMaZQzeE3YatYCW0bK6 dZbr0jPRUP4a+H2rGN0m1bgwdQljay+HTgNAIDj1Ng0u996bj4ijFv8a7fEkqknAKq1MaJ+Evpr mYheOn2CU= X-Received: by 2002:a05:6122:d0d:b0:55a:e007:4c7e with SMTP id 71dfb90a1353d-563a093a35dmr2171478e0c.6.1768436192247; Wed, 14 Jan 2026 16:16:32 -0800 (PST) Received: from localhost ([2800:bf0:4580:3149:c903:2904:3cc3:8b4c]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-563618ff8d5sm19216082e0c.7.2026.01.14.16.16.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jan 2026 16:16:31 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 14 Jan 2026 19:16:30 -0500 Message-Id: Cc: "Guenter Roeck" , , , Subject: Re: [PATCH v9 7/7] platform/x86: lenovo-wmi-other: Add HWMON for fan reporting/tuning From: "Kurt Borja" To: "Rong Zhang" , "Mark Pearson" , "Derek J. Clark" , "Armin Wolf" , "Hans de Goede" , =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260114122745.986699-1-i@rong.moe> <20260114122745.986699-8-i@rong.moe> In-Reply-To: <20260114122745.986699-8-i@rong.moe> Hi Rong, On Wed Jan 14, 2026 at 7:27 AM -05, Rong Zhang wrote: > Register an HWMON device for fan reporting/tuning according to > Capability Data 00 (capdata00) and Fan Test Data (capdata_fan) provided > by lenovo-wmi-capdata. The corresponding HWMON nodes are: > > - fanX_enable: enable/disable the fan (tunable) > - fanX_input: current RPM > - fanX_max: maximum RPM > - fanX_min: minimum RPM > - fanX_target: target RPM (tunable) > > Information from capdata00 and capdata_fan are used to control the > visibility and constraints of HWMON attributes. Fan info from capdata00 > is collected on bind, while fan info from capdata_fan is collected in a > callback. Once all fan info is collected, register the HWMON device. > > Signed-off-by: Rong Zhang > Reviewed-by: Derek J. Clark > --- ... > diff --git a/Documentation/wmi/devices/lenovo-wmi-other.rst b/Documentati= on/wmi/devices/lenovo-wmi-other.rst > index 821282e07d93c..bd1d733ff286d 100644 > --- a/Documentation/wmi/devices/lenovo-wmi-other.rst > +++ b/Documentation/wmi/devices/lenovo-wmi-other.rst > @@ -31,6 +31,8 @@ under the following path: > =20 > /sys/class/firmware-attributes/lenovo-wmi-other/attributes/= / > =20 > +Additionally, this driver also exports attributes to HWMON. > + > LENOVO_CAPABILITY_DATA_00 > ------------------------- > =20 > @@ -39,6 +41,11 @@ WMI GUID ``362A3AFE-3D96-4665-8530-96DAD5BB300E`` > The LENOVO_CAPABILITY_DATA_00 interface provides various information tha= t > does not rely on the gamezone thermal mode. > =20 > +The following HWMON attributes are implemented: > + - fanX_enable: enable/disable the fan (tunable) I was testing this series and I'm a bit confused about fanX_enable. Judging by this comment and also by taking a quick look at the code, it looks like writting 0 to this attribute disables the fan. This is however (per hwmon ABI documentation [1]) not how this attribute should work. IIUC, it is intended for devices which can disable the fan sensor, not the actual fan. I fail to see how this feature is useful and I also find it dangerous for this to be exposed by default, considering the same could be achieved with the relaxed module parameter, which at least tells the user to be careful. Apologies if I missed some previous discussion on this. [1] https://elixir.bootlin.com/linux/v6.19-rc5/source/Documentation/ABI/tes= ting/sysfs-class-hwmon#L279 --=20 Thanks, ~ Kurt