STRUCT BACKLIGHT_PROPERTIES(9)
π struct backlight_properties(9) β Kernel API Manual, but make it make sense
Okay bestie, listen up β¨ β this is a page straight out of the Kernel API Manual, and it's all about struct backlight_properties. Yep, that's the whole vibe: it's the glow-up blueprint for your backlight. Let's get into it π«Ά
πΈ NAME πΈ
struct backlight_properties β literally just the backlight properties, no cap π
β¨ SYNOPSIS β¨
struct backlight_properties {
int brightness;
int max_brightness;
int power;
#define BACKLIGHT_POWER_ON (0);
#define BACKLIGHT_POWER_OFF (4);
#define BACKLIGHT_POWER_REDUCED (1);
enum backlight_type type;
unsigned int state;
#define BL_CORE_SUSPENDED (1 << 0) ;
#define BL_CORE_FBBLANK (1 << 1) ;
enum backlight_scale scale;
};
π Members π
brightnessβ the brightness the user is currently asking for π
The backlight core is literally the responsible friend here: when brightness gets set through the sysfs attribute /sys/class/backlight/<backlight>/brightness, the core makes sure the value stays in the range (0 to max_brightness). Iconic.
You can also set this one inside the backlight_properties you hand to devm_backlight_device_register if you wanna ship a default brightness value.
max_brightnessβ the maximum brightness value, the ceiling, the limit, the "you shall not pass" π
You must set this in the backlight_properties you pass to devm_backlight_device_register, and then the driver is not allowed to touch it after registration. Periodt.
powerβ the current power mode β‘
Userspace can configure the power mode via the sysfs attribute /sys/class/backlight/<backlight>/bl_power. When the power property gets updated, update_status gets called. That's the whole flow, iykyk.
Possible values are (0: full on, 4: full off) β peep the BACKLIGHT_POWER constants above π
When the backlight device is enabled, power is set to BACKLIGHT_POWER_ON. When the backlight device is disabled, power is set to BACKLIGHT_POWER_OFF.
typeβ the type of backlight being supported π¦
This lets userspace make the appropriate policy decisions based on the backlight type. Very much giving "main character makes informed choices".
You must set this in the backlight_properties passed to devm_backlight_device_register.
stateβ the state of the backlight core, bestie π§
It's a bitmask, so think of it like little flags doing their thing. BL_CORE_FBBLANK is set when the display is expected to be blank. BL_CORE_SUSPENDED is set when the driver is suspended.
Backlight drivers are expected to use backlight_is_blank inside their update_status operation rather than reading the state property directly β don't go poking around, use the intended accessor π
The core maintains state, and drivers may not modify it. Hands off, queen π
scaleβ the type of the brightness scale π
π Description π
This structure defines all the properties of a backlight. That's it, that's the whole point β every property, one struct, so clean, so organized π
π₯ SEE ALSO π₯
Kernel file ./include/linux/backlight.h
enum backlight_update_reason(9), enum backlight_type(9), struct backlight_ops(9), struct backlight_device(9), backlight_update_status(9), backlight_enable(9), backlight_disable(9), backlight_is_blank(9), backlight_get_brightness(9), bl_get_data(9)
And that's the page, babes π this beauty lives in ./include/linux, shipped in the October 2026 drop of struct backlight_properties(9) β go read the source, it ate πβ¨
π¦ 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