BACKLIGHT(9)
π‘ 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2020 Emmanuel Vadot <manu@freebsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms