public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Yauhen Kharuzhy <jekhor@gmail.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Sasha Levin <sashal@kernel.org>,
	rafael@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 6.19-6.12] ACPI: x86: Force enabling of PWM2 on the Yogabook YB1-X90
Date: Fri, 20 Feb 2026 07:37:54 -0500	[thread overview]
Message-ID: <20260220123805.3371698-5-sashal@kernel.org> (raw)
In-Reply-To: <20260220123805.3371698-1-sashal@kernel.org>

From: Yauhen Kharuzhy <jekhor@gmail.com>

[ Upstream commit a8c975302868c716afef0f50467bebbd069a35b8 ]

The PWM2 on YB1-X90 tablets is used for keyboard backlight control but
it is disabled in the ACPI DSDT table. Add it to the override_status_ids
list to allow keyboard function control driver
(drivers/platform/x86/lenovo/yogabook.c) to use it.

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
Link: https://patch.msgid.link/20260211222242.4101162-1-jekhor@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

Now I have a comprehensive picture. Let me analyze this commit.

## Analysis

### 1. Commit Message Analysis

The commit adds an entry to the `override_status_ids` list in
`drivers/acpi/x86/utils.c` to force-enable the PWM2 ACPI device on
Lenovo Yoga Book YB1-X90 tablets. The PWM2 is used for keyboard
backlight control but is disabled in the ACPI DSDT table. Without this
override, the yogabook platform driver cannot control the keyboard
backlight.

### 2. Code Change Analysis

The change is a straightforward addition of a `PRESENT_ENTRY_HID` entry
to the existing quirk table. It:
- Targets HID `"80862289"` (Intel Cherry Trail PWM), UID `"2"` (PWM2
  specifically)
- Scopes to `INTEL_ATOM_AIRMONT` CPU platform (Cherry Trail)
- Narrows with 3 DMI_EXACT_MATCH entries specific to the Yoga Book
  Android variant (YETI-11)
- This is the exact same pattern as the existing Xiaomi Mi Pad 2 entry
  (lines 78-82) which also enables PWM2 for touchkey backlight control

The change is ~12 lines including the comment. It follows an
established, well-understood pattern that's been used in this file for
years.

### 3. Classification: Hardware Quirk

This is a **hardware quirk/workaround** — one of the explicitly allowed
exception categories for stable backports. The device has broken ACPI
firmware (DSDT disables a needed device), and this quirk works around it
by forcing the device present.

### 4. Scope and Risk Assessment

- **Very small change**: ~12 lines added to a data table
- **Zero risk to other hardware**: The DMI_EXACT_MATCH conditions ensure
  this only triggers on the exact Lenovo Yoga Book YB1-X90 (YETI-11
  variant)
- **Well-tested pattern**: Identical to the Xiaomi Mi Pad 2 entry that's
  been in the kernel since v4.18
- **No code logic changes**: Only adds data to an existing table

### 5. Dependencies

The change depends on:
- The `override_status_ids` mechanism — present since at least v4.x
- The yogabook platform driver
  (`drivers/platform/x86/lenovo/yogabook.c`) — added in v6.6 via commit
  `6df1523fa0b79`
- The keyboard backlight support in the platform driver — added in v6.6
  via commit `fc4f1d88bc6b1`

The prerequisite code exists in all current stable trees (6.6+). The
file path changed recently (moved to `lenovo/` subdirectory in commit
`651b57dd40871`), so older stable trees may need minor context
adjustment, but the data-table addition itself is trivially portable.

### 6. User Impact

Without this quirk, the keyboard backlight on Lenovo Yoga Book YB1-X90
tablets doesn't work under Linux. This is a real hardware enablement
issue for a specific consumer tablet.

### 7. Stable Suitability

- **Obviously correct**: Follows the exact same pattern as existing
  entries
- **Fixes a real issue**: Keyboard backlight doesn't work without it
- **Small and contained**: Data-only addition to a quirk table
- **No new features**: Enables existing functionality on specific
  hardware
- **No new APIs**: Pure internal quirk

### Verification

- Verified `fc4f1d88bc6b1` (keyboard backlight platform driver) is in
  v6.6 via `git merge-base --is-ancestor`
- Verified `6df1523fa0b79` (platform driver support) is in v6.6 via `git
  merge-base --is-ancestor`
- Verified `1a1e7540cf501` (ACPI quirk for i2c clients) is in v6.6 via
  `git merge-base --is-ancestor`
- Verified the existing Xiaomi Mi Pad 2 PWM2 entry (`b72cd8e0fa34d`) is
  in v6.6 via `git merge-base --is-ancestor`, confirming the
  infrastructure exists
- Read `drivers/acpi/x86/utils.c` lines 55-104 to confirm the existing
  code structure and similar entries
- Confirmed via git log that the commit `a8c975302868c` exists and
  matches the described change
- The agent exploration confirmed the yogabook platform driver at
  `drivers/platform/x86/lenovo/yogabook.c` uses `devm_pwm_get(dev,
  "pwm_soc_lpss_2")` at line 488, which is the PWM2 device being enabled
  by this quirk

This is a textbook hardware quirk addition — small, safe, DMI-scoped to
one specific device, follows an established pattern, and enables real
hardware functionality for users. It meets all stable kernel criteria.

**YES**

 drivers/acpi/x86/utils.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index 4ee30c2897a2b..418951639f511 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -81,6 +81,18 @@ static const struct override_status_id override_status_ids[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
 	      }),
 
+	/*
+	 * Lenovo Yoga Book uses PWM2 for touch keyboard backlight control.
+	 * It needs to be enabled only for the Android device version (YB1-X90*
+	 * aka YETI-11); the Windows version (YB1-X91*) uses ACPI control
+	 * methods.
+	 */
+	PRESENT_ENTRY_HID("80862289", "2", INTEL_ATOM_AIRMONT, {
+		DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+		DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
+		DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
+	      }),
+
 	/*
 	 * The INT0002 device is necessary to clear wakeup interrupt sources
 	 * on Cherry Trail devices, without it we get nobody cared IRQ msgs.
-- 
2.51.0


  parent reply	other threads:[~2026-02-20 12:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20 12:37 [PATCH AUTOSEL 6.19-5.15] libceph: define and enforce CEPH_MAX_KEY_LEN Sasha Levin
2026-02-20 12:37 ` [PATCH AUTOSEL 6.19-5.15] fs: ntfs3: fix infinite loop triggered by zero-sized ATTR_LIST Sasha Levin
2026-02-20 12:37 ` [PATCH AUTOSEL 6.19-6.6] thermal: int340x: Fix sysfs group leak on DLVR registration failure Sasha Levin
2026-02-20 12:37 ` [PATCH AUTOSEL 6.19-5.15] fs: ntfs3: check return value of indx_find to avoid infinite loop Sasha Levin
2026-02-20 12:37 ` Sasha Levin [this message]
2026-02-20 12:37 ` [PATCH AUTOSEL 6.19-5.15] fs/ntfs3: avoid calling run_get_entry() when run == NULL in ntfs_read_run_nb_ra() Sasha Levin
2026-02-20 12:37 ` [PATCH AUTOSEL 6.19-6.1] ceph: supply snapshot context in ceph_uninline_data() Sasha Levin
2026-02-20 12:37 ` [PATCH AUTOSEL 6.19] fs/ntfs3: handle attr_set_size() errors when truncating files Sasha Levin
2026-02-20 12:37 ` [PATCH AUTOSEL 6.19-6.18] ntfs3: fix circular locking dependency in run_unpack_ex Sasha Levin
2026-02-20 12:37 ` [PATCH AUTOSEL 6.19-6.1] fs/ntfs3: drop preallocated clusters for sparse and compressed files Sasha Levin
2026-02-20 12:38 ` [PATCH AUTOSEL 6.19-5.15] fs: ntfs3: fix infinite loop in attr_load_runs_range on inconsistent metadata Sasha Levin

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=20260220123805.3371698-5-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=jekhor@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=stable@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