From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179]) (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 52CA21397 for ; Thu, 15 Jan 2026 00:16:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768436194; cv=none; b=lAzfrZ6+sCQDZIbesC5w8rJ9Sm59RO0oRiX8Kqq2ZDkZx58jL+Er15e7kDgEFVwRhI2af144YZ+NG0ElFPP0hNYMEu7NWj2TwncsWN9/aKFV+zLhxfpx3M0BEkAh1XGuCd2EDsxzpdEuLBsaGvr+VoT4crxVeer/L9aBLvRIxQk= 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.179 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-f179.google.com with SMTP id 71dfb90a1353d-5636784883bso334098e0c.3 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=ldF3RdwFS6Epxg9e9nIzmeh04maLabE6d661Vf82SktoFBcoyLD/1vSqaWKGDa76qI ZEae6a6NhZ5bLCAujxSr/To+sZ4aib2tEBD/l/qJdLT4wP25b8vOi6zCgHK7fox+bbIu 1nnwMvCFMPM0vwa5YF6yyRLensN7YV63yRoK2Ms5HcWieBmACxMeIk24alFBjWErKkFi X55n+YVcYUfXudWVKB3zZaivnLH6rLCJJUcL3Qah3H80ne106pj59JywZFBY2P4mwILR UDint3Fye6fNo0+oLRM+eJYjO8mg0jHRYcXfW+KGa77mS9ppYqydNA62QoK9Cc9lRmTr TRLw== X-Forwarded-Encrypted: i=1; AJvYcCW8rNeBtYC2yyTdqPjtVcHxvvgUVlH+5dQ679Bz/gJzssM9hkMq3cgowwurbWv8PV7Gb/9J205liFkhqi0E0+HxI+6T@vger.kernel.org X-Gm-Message-State: AOJu0YyWllQ1fpWUgRyWg+KzmEdn0W5X1Zs46+OcAvoMRjZzrNcVnkbj E+/T9u+KUHHvRffU4umQOyBqZLTyiRvMa8eOBRTebyQ1Z8IFZ+06Z1Ld X-Gm-Gg: AY/fxX5FfzCKH+aj5zntYSl0/dgbuWrz3hG5LCxqw4Dqm+P+XgRgD/wfSRcmUsmdBQY rsgDquKAwDRJMM7kY9Agx3Y052DKDWYfpsKpzGMSEqJU51GTSJY3Q0CUI4E4BHMa5C2hsulR4dJ DG5Q0wrN4WSkqmnvruN+MKEzNGn9EMmMVu3nP5OCFu3dOY6T4iYBxcVNreHMTMc9q2JXZffX16c b+xBsyNhjgl3nsTJ2r9ljrGsAEhy4UQd4IEoI6HlOEn+M3FdyySnaXi9ueexlCZqRsXJtzh/NPE 6EQ3nyDk2vWwBD9XH731Hh9Bw+ya6jkrRblDGyYPKvb3XkarHzw05j7fFiEV3iqesytrPLyN0u3 Ih8/NjF4qF8FA4hPlPDRpIPM1p7O9bmPThCfCpiqYSoHGlhXzBh/v6zhom1cfuqUw27nVjXqvMY kdhe4Nc5Q= 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: platform-driver-x86@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