Linux Input/HID development
 help / color / mirror / Atom feed
From: Andre Eikmeyer <dev@deq.rocks>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: linux-input@vger.kernel.org, Aditya Garg <gargaditya08@live.com>,
	Andre Eikmeyer <dev@deq.rocks>
Subject: [PATCH 2/2] HID: apple: use the standard keyboard backlight LED name
Date: Sat, 18 Jul 2026 14:15:27 +0200	[thread overview]
Message-ID: <20260718121527.15924-2-dev@deq.rocks> (raw)
In-Reply-To: <20260718121527.15924-1-dev@deq.rocks>

The T2-attached butterfly keyboard backlight is exposed as
apple::kbd_backlight. This leaves the color field empty and gives
userspace a model-specific name for the same white keyboard-backlight
function exposed by Magic Keyboards.

Magic Keyboard backlight support was added later and already follows the
current LED naming convention. As a result, userspace has to handle two
different names for the same function.

We should use :white:kbd_backlight for both implementations. This follows
the LED color and function naming convention and lets userspace discover
either keyboard generation without a special case for the butterfly
models.

Signed-off-by: Andre Eikmeyer <dev@deq.rocks>
---
 drivers/hid/hid-apple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index a5f232cc2b66..0f30cf4670ce 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -861,7 +861,7 @@ static int apple_backlight_init(struct hid_device *hdev)
 	}
 
 	asc->backlight->hdev = hdev;
-	asc->backlight->cdev.name = "apple::kbd_backlight";
+	asc->backlight->cdev.name = ":white:" LED_FUNCTION_KBD_BACKLIGHT;
 	asc->backlight->cdev.max_brightness = rep->backlight_on_max;
 	asc->backlight->cdev.brightness_set_blocking = apple_backlight_led_set;
 	/* VHCI re-enumeration restores the cached brightness in the next probe. */
-- 
2.55.0


  reply	other threads:[~2026-07-18 12:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-18 12:15 [PATCH 1/2] HID: apple: preserve keyboard backlight across T2 resume Andre Eikmeyer
2026-07-18 12:15 ` Andre Eikmeyer [this message]
2026-07-18 12:36   ` [PATCH 2/2] HID: apple: use the standard keyboard backlight LED name sashiko-bot
2026-07-18 15:00     ` Andre Eikmeyer
2026-07-18 12:35 ` [PATCH 1/2] HID: apple: preserve keyboard backlight across T2 resume sashiko-bot
2026-07-18 15:00   ` Andre Eikmeyer

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=20260718121527.15924-2-dev@deq.rocks \
    --to=dev@deq.rocks \
    --cc=bentiss@kernel.org \
    --cc=gargaditya08@live.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@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