STRUCT KEYBOARD_LED_DRVDATA(9)
πΈ NAME πΈ
okay so bestie, welcome to the Kernel API Manual β¨ β this page is literally about struct keyboard_led_drvdata, aka keyboard LED driver data. periodt. π
β¨ SYNOPSIS β¨
here's the struct in all its iconic glory, copied exactly so we don't break anything:
struct keyboard_led_drvdata {
int (*init)(struct platform_device *pdev, struct keyboard_led
*keyboard_led);
enum led_brightness (*brightness_get)(struct led_classdev
*led_cdev);
void (*brightness_set)(struct led_classdev *led_cdev, enum
led_brightness brightness);
int (*brightness_set_blocking)(struct led_classdev *led_cdev, enum
led_brightness brightness);
};
π Members π
initβ Init function. π οΈbrightness_getβ Get LED brightness level. πbrightness_setβ Set LED brightness level. Must not sleep. β οΈ like, do not let this function catch Zs, no cap.brightness_set_blockingβ Set LED brightness level. It can block the caller for the time required for accessing a LED device register. β³ yes, it can literally block β that's the whole vibe.
π¦ Description π¦
See struct led_classdev in include/linux/leds.h for more details. β¨
π₯ SEE ALSO π₯
- Kernel file
./drivers/platform/chrome/cros_kbd_led_backlight.cπ
xoxo from the ./drivers/platform/chrome girlies π β this page is dated October 2026 β¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms