From: Rillian Grant <rillian.grant@gmail.com>
To: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Ruslan Koreev <koreev.r@gmail.com>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Rillian Grant <rillian.grant@gmail.com>
Subject: [PATCH v2 4/4] leds: flash: lm3643: Describe the LED on the Lenovo ThinkPad X9-15 Gen 1
Date: Mon, 28 Sep 2026 10:42:37 +0100 [thread overview]
Message-ID: <20260928094302.86966-5-rillian.grant@gmail.com> (raw)
In-Reply-To: <20260928094302.86966-1-rillian.grant@gmail.com>
The ThinkPad X9-15 Gen 1 enumerates the LM3643 through ACPI (HID
TXNW3643) without a _DSD, like the X1 Carbon Gen 14. It drives the
Windows Hello IR flood illuminator with both current sources feeding a
single LED.
The flash limits were obtained from an ETW trace of the SPB class
extension during a Windows Hello unlock. The Windows driver programs
304 mA per current source (code 0x19 with the LED2 override set) and a
400 ms flash timeout.
There is no vendor value for the torch limit, so use the same
conservative limit as the X1 Carbon Gen 14.
Rename the X1 Carbon Gen 14 nodes after the machine now that the table
has a second entry. Sources and root node remain shared.
Signed-off-by: Rillian Grant <rillian.grant@gmail.com>
---
drivers/leds/flash/leds-lm3643.c | 70 +++++++++++++++++++++++++-------
1 file changed, 55 insertions(+), 15 deletions(-)
diff --git a/drivers/leds/flash/leds-lm3643.c b/drivers/leds/flash/leds-lm3643.c
index 1c0de38ebcdf..b9d167e25375 100644
--- a/drivers/leds/flash/leds-lm3643.c
+++ b/drivers/leds/flash/leds-lm3643.c
@@ -691,16 +691,21 @@ static int lm3643_register_led(struct device *dev, struct lm3643 *chip,
return lm3643_register_v4l2(dev, led, fwnode);
}
-/*
- * Lenovo ThinkPads enumerate the chip through ACPI (HID TXNW3643) without a
- * _DSD, so the LED is not described by firmware. On the boards below it drives
- * the Windows Hello IR flood illuminator, with both current sources feeding a
- * single LED. Describe that with a software node, with torch and flash limits
- * (100 mA and 300 mA per output) well below the chip's maximums.
- */
static const u32 lm3643_ir_flood_sources[] = { 0, 1 };
-static const struct property_entry lm3643_ir_flood_props[] = {
+static const struct software_node lm3643_ir_flood_root = {
+ .name = "lm3643",
+};
+
+/*
+ * The Lenovo ThinkPad X1 Carbon Gen 14 enumerates the chip through ACPI
+ * (HID TXNW3643) without a _DSD, so the LED is not described by firmware.
+ * On the X1 Gen 14 it drives the Windows Hello IR flood illuminator, with
+ * both current sources feeding a single LED. Describe that with a software
+ * node, with torch and flash limits (100 mA and 300 mA per output) well below
+ * the chip's maximums.
+ */
+static const struct property_entry lm3643_x1c14_props[] = {
PROPERTY_ENTRY_U32("reg", 0),
PROPERTY_ENTRY_U32_ARRAY("led-sources", lm3643_ir_flood_sources),
PROPERTY_ENTRY_STRING("function", LED_FUNCTION_FLASH),
@@ -711,19 +716,46 @@ static const struct property_entry lm3643_ir_flood_props[] = {
{ }
};
-static const struct software_node lm3643_ir_flood_root = {
- .name = "lm3643",
+static const struct software_node lm3643_x1c14_led = {
+ .name = "led-0",
+ .parent = &lm3643_ir_flood_root,
+ .properties = lm3643_x1c14_props,
+};
+
+static const struct software_node *lm3643_x1c14_nodes[] = {
+ &lm3643_ir_flood_root,
+ &lm3643_x1c14_led,
+ NULL
};
-static const struct software_node lm3643_ir_flood_led = {
+/*
+ * The Lenovo ThinkPad X9-15 Gen 1 enumerates the chip through ACPI
+ * (HID TXNW3643) without a _DSD. On the X9-15 it drives the Windows Hello IR
+ * flood illuminator, with both current sources feeding a single LED. Flash
+ * maximums were obtained from an SPB class extension ETW trace of the
+ * vendor-supplied Windows driver. The torch limit is a conservative value well
+ * below the chip's maximum.
+ */
+static const struct property_entry lm3643_x9_15_props[] = {
+ PROPERTY_ENTRY_U32("reg", 0),
+ PROPERTY_ENTRY_U32_ARRAY("led-sources", lm3643_ir_flood_sources),
+ PROPERTY_ENTRY_STRING("function", LED_FUNCTION_FLASH),
+ PROPERTY_ENTRY_U32("color", LED_COLOR_ID_IR),
+ PROPERTY_ENTRY_U32("led-max-microamp", 200000),
+ PROPERTY_ENTRY_U32("flash-max-microamp", 608050),
+ PROPERTY_ENTRY_U32("flash-max-timeout-us", 400000),
+ { }
+};
+
+static const struct software_node lm3643_x9_15_led = {
.name = "led-0",
.parent = &lm3643_ir_flood_root,
- .properties = lm3643_ir_flood_props,
+ .properties = lm3643_x9_15_props,
};
-static const struct software_node *lm3643_ir_flood_nodes[] = {
+static const struct software_node *lm3643_x9_15_nodes[] = {
&lm3643_ir_flood_root,
- &lm3643_ir_flood_led,
+ &lm3643_x9_15_led,
NULL
};
@@ -734,7 +766,15 @@ static const struct dmi_system_id lm3643_dmi_leds[] = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X1 Carbon Gen 14"),
},
- .driver_data = (void *)lm3643_ir_flood_nodes,
+ .driver_data = (void *)lm3643_x1c14_nodes,
+ },
+ {
+ /* Lenovo ThinkPad X9-15 Gen 1 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X9-15 Gen 1"),
+ },
+ .driver_data = (void *)lm3643_x9_15_nodes,
},
{ }
};
--
2.55.0
prev parent reply other threads:[~2026-09-28 9:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 9:42 [PATCH v2 0/4] leds: flash: LM3643 dual LED flash driver Rillian Grant
2026-09-28 9:42 ` [PATCH v2 1/4] dt-bindings: leds: Document TI " Rillian Grant
2026-09-28 9:42 ` [PATCH v2 2/4] leds: flash: Add support for the " Rillian Grant
2026-09-28 9:42 ` [PATCH v2 3/4] leds: flash: lm3643: Describe the LED of ACPI boards without LED nodes Rillian Grant
2026-09-28 9:42 ` Rillian Grant [this message]
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=20260928094302.86966-5-rillian.grant@gmail.com \
--to=rillian.grant@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=koreev.r@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=robh@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
all inboxes | Powered by JetHome®