BACKLIGHT(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’‘ BACKLIGHT(9) β€” the kernel dev manual page, bestie edition

okay so this is the BACKLIGHT(9) page from the Kernel Developer's Manual, and it's all about backlight, backlight_register, backlight_destroy, BACKLIGHT_GET_STATUS, and BACKLIGHT_SET_STATUS β€” aka the BACKLIGHT methods. yes the name is in all caps twice, she's dramatic like that πŸ’…


✨ SYNOPSIS ✨

device backlight
#include <backlight_if.h>
#include <sys/sys/backlight.h>

int
BACKLIGHT_GET_STATUS(device_t bus, struct backlight_props *props);

int
BACKLIGHT_SET_STATUS(device_t bus, struct backlight_props *props);

struct cdev *
backlight_register(const char *name, device_t dev);

int
backlight_destroy(struct cdev *cdev);

🌸 DESCRIPTION 🌸

so the backlight driver is literally the glow-up department for your panel β€” it gives you a generic way to handle a panel backlight. no cap, that's the whole vibe.

drivers for the backlight system register themselves globally using the backlight_register() function. and they're not allowed to be lazy about it β€” they must define two methods:

  • BACKLIGHT_GET_STATUS() β€” the one you use to query the current brightness level πŸ”
  • BACKLIGHT_SET_STATUS() β€” the one you use to update it πŸ”₯

πŸŽ€ INTERFACE πŸŽ€

  • BACKLIGHT_GET_STATUS(device_t bus, struct backlight_props *props) β€” the driver fills in the current brightless level plus the optional supported levels. (yes, "brightless", that's genuinely what the page says, I'm not fixing it, it's iconic πŸ’€)
  • BACKLIGHT_SET_STATUS(device_t bus, struct backlight_props *props) β€” the driver updates the backlight level based on the brightness member of the props struct. straightforward, she ate. πŸ‘‘

πŸ¦‹ FILES πŸ¦‹

  • /dev/backlight/*

🌈 SEE ALSO 🌈

(iykyk β€” go read that one next, bestie 🫢)


⭐ HISTORY ⭐

the backlight interface first appear in FreeBSD 13.0. and the backlight driver + this manual page was written by Emmanuel Vadot <manu@FreeBSD.org>. absolute main character energy, we stan πŸ’œ


fr fr, keep the two methods defined or the whole registration thing doesn't happen. that's not a suggestion, that's the whole assignment.

okay that's the page!! sign-off time: this beauty came from Debian, dated October 2, 2020 πŸŽ€ go touch some brightness sliders bestie, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from