From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f51.google.com (mail-dl1-f51.google.com [74.125.82.51]) (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 4E2A41B808 for ; Tue, 24 Feb 2026 04:32:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771907529; cv=none; b=qsphF85sr/XM170yBnGydjtHfNKLp8NI7/ZzLlw69yWKcAxt+i0NP+nwUmViU88iAytMN5s63bqO3w4OKeCNCqGZw2GLGRZOCsqqCGt96DFJlbqgBo3y/1tt7ahb3LntYA4h55XAXKlbKqCaNPicJpjzonlD5rDzsWiiVeqS0AY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771907529; c=relaxed/simple; bh=pzGDAPbkZDJv1rp0Tbv0QQWjzaIKnf+WLO0uDPkRTVM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C8nYo3KjCXObihZN777YJLmmdKx7xNf6UlfIwJACVlF1pT8Smdy+PtC7aCZLt1Xn7smYKwqZhaYv3e/p9GGLtDhEC50gF4NZu+pEC1RoPyJZnPG7dO74S6tXU/w6rpFTHp0xVIncOClgCIDgXgGEL1QksSIOHMz3AWXkv4VrVGs= 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=UA/vb2Eu; arc=none smtp.client-ip=74.125.82.51 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="UA/vb2Eu" Received: by mail-dl1-f51.google.com with SMTP id a92af1059eb24-126ea4e9694so51509c88.1 for ; Mon, 23 Feb 2026 20:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771907527; x=1772512327; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=96FEkbxKyA0xiM5RUxBniGIhI9mGW5et9LNYlToTuvI=; b=UA/vb2EuYv41+hW9AHL7Wl/M0lQiuLMmffnIsCeYyybJurtfhNry8tGxIbEDYSOrOL ef4daQ6vC/UtbEbo01I4tQuKFYwuZOOMCksdfqPxkx5nXv2NZfIFE9gNTSlLmiOsUrTz K6AiSmnRXphhrY/rRA2/CrmJpCfY700aEVZzwYMzvOiWb7d5TxI2AldclpUo+2cWyKt8 AbA+7D/ouYE40UCP8YS31YWrP9MtgjLlW2AD7w3V2a/PHY7tFsRuS3f+SVFDD9AH9Fu9 lXVUvs1UJ6eZL7DSo623eGc24FVo7iHJ/99x9GKF9anlHzhequEbzUhbv8wlgmq7cQ6b oMDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771907527; x=1772512327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=96FEkbxKyA0xiM5RUxBniGIhI9mGW5et9LNYlToTuvI=; b=fyXWBmNdI1CWUJgkAVIMQDaxIOKdpVlZ78i0CFKpxWPwLtAvWakep0pVcJKAE8AarD AvoLeO3RLJbQBr9PZKENvLFUdhp3iomVSkCnWqC3lIWm3sfgH6uHxfFjuK5yTPWnR2jS ZFdGluK7lwRO4O4heVNon+IxOWI5txAi4mhMGEI1K8zm660vLsAtFmQZVcfFjfjFeYe4 QzjR5dex9BxkZcX6sOGhGm40g6cd8JJOcKo99dN10rUiXrO9UgRxwa8aGtJY27hQCD1G DG0s5K/fguOQtUUL4KhqL+YXtRe8phL/jYxIfVOmQV6Flz2PYr/KbjPq0kChxAOAWWMt GpGQ== X-Forwarded-Encrypted: i=1; AJvYcCUqVeeKj533qxFFX0Ir84korHC4aNF178qwgAuGzO1J/z3/KBzmwE8Z9ORaYuF3REsWgBP1qWqEr4l5NrA=@vger.kernel.org X-Gm-Message-State: AOJu0Yzl4Yqsa5+QrTUP/TAzPcAxfNp/RSfntWX30CIAwPFB8AYiK+/p SOJRRwGj7EpY75s/3axA+AeW71/I92SMwZQnXE8rjypIV5LOPiN12poP X-Gm-Gg: AZuq6aLSCNJiihvkC896sDh6paxP0Lh2dtqe+G5cFG8SJM1Dh0ZJzHz5Ykz668Nunau WBGJimOXRsIfxnox7+Lr8R7QRVrTPzKF5wZYLv4tX3Guh+y67FXPvzlcvWyutH95KOyEbCFb38B 0SUKQYdUe4F6fFRZQJHkuIYEymddqaFOQ/wmv9OH71HgujrpgfIcpgtYHDE20emBA0oz5v72mdD A1hUR4GkkgMhVBtJb64bU8HFBLA4vFYbdOrPcDOXVXZqxReT2En8A/YA7SnssySNt6rRgkX33Ib Yhm4O16yeNGoHs2QJ9VgyLiNH8qMvCGj2qCNgElZJ2jXGFSM07U/0cGaTg3lWUiAcRoiJS4lj9C OsXRpruoipOUMBDFfI2DsN8wc0OGoSsoFl58oqOZ8CPgg9QAd2MhqUlkny8WguSk7NUzbOq98Y5 sodKbS7zAeo4dMtDbjMCx93iyVkCgb7B9glYRfwW7B9SDi5dVbQtxsv1mM0gPhBQKakzcc+Ll/c vE= X-Received: by 2002:a05:7022:403:b0:119:e56b:9590 with SMTP id a92af1059eb24-1276ad11b1bmr5122346c88.21.1771907527256; Mon, 23 Feb 2026 20:32:07 -0800 (PST) Received: from lappy (108-228-232-20.lightspeed.sndgca.sbcglobal.net. [108.228.232.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1276af7b4c7sm9607887c88.9.2026.02.23.20.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Feb 2026 20:32:07 -0800 (PST) From: "Derek J. Clark" To: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Hans de Goede Cc: Mark Pearson , Armin Wolf , Jonathan Corbet , Rong Zhang , Kurt Borja , "Derek J . Clark" , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/6] platform-x86: lenovo-wmi: Add fixes and enhancement Date: Tue, 24 Feb 2026 04:31:54 +0000 Message-ID: <20260224043200.2680384-1-derekjohn.clark@gmail.com> X-Mailer: git-send-email 2.52.0 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 many much needed features and fixes to the lenovo-wmi drivers. Patch 1 adds a macro to make assigning attribute ID's for capdata cleaner and easier. Patch 2 addresses bugs where devices that don't support exposed attributes would still create the attribute, and also attempts to identify the correct capdata and set/get methods as some legacy interfaces don't use the custom mode in the method or capdata ID. Patch 3 adds the remaining CPU attributes that weren't previously exposed. Patch 4 adds the GPU attributes that weren't previously exposed. Patch 5 consolidates name constants in preparation for patch 6. Patch 6 adds battery charge-type limiting when supported only by WMI. After applying Rong's series from https://lore.kernel.org/platform-driver-x86/20260210191938.137234-1-i@rong.moe/ I found that there weren't any conflicts, so rather than combine the series we can just review each separately. Signed-off-by: Derek J. Clark --- v3: - Re-add HWMON name const and jsut rename LWMI_OM_FW_ATTR_BASE_PATH - Fix linker warnings by moving acpi/battery include to the end of the list. - Remove CPU/GPU OC features. These attributes are BOOL type and will need a new constructor that I'll add later. v2: - Fix gpu_mode misisng from attributes list. - Fix prototypes for power suppy patch. - Reorganize CPU and GPU attributes alphabetically. - Break out the patch consolidating the driver name cost. - Move some of the refactoring of attribute_id back to into patch 1 where it belongs. - Fix some additional typos in function prototypes. v1: https://lore.kernel.org/platform-driver-x86/20260213081243.794288-1-derekjohn.clark@gmail.com/ Derek J. Clark (6): platform/x86: lenovo-wmi-other: Add LWMI_ATTR_ID Macro platform/x86: lenovo-wmi-other: Limit adding attributes to supported devices platform/x86: lenovo-wmi-other: Add missing CPU tunable attributes platform/x86: lenovo-wmi-other: Add GPU tunable attributes platform-x86: lenovo-wmi-other: Rename LWMI_OM_FW_ATTR_BASE_PATH platform/x86: lenovo-wmi-other: Add WMI battery charge limiting. .../wmi/devices/lenovo-wmi-other.rst | 21 + drivers/platform/x86/lenovo/wmi-capdata.h | 13 +- drivers/platform/x86/lenovo/wmi-gamezone.h | 1 + drivers/platform/x86/lenovo/wmi-other.c | 605 ++++++++++++++++-- 4 files changed, 593 insertions(+), 47 deletions(-) -- 2.52.0