STRUCT KEYBOARD_LED_DRVDATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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