STRUCT LM3530_PLATFORM_DATA(9)
π struct lm3530_platform_data(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this is the page for struct lm3530_platform_data, and we're gonna go through it field by field, no skipping, no cap. It's a struct, it's got members, and every single one of them is here. let's get into it π«Ά
πΈ NAME πΈ
struct lm3530_platform_data β and that's literally it, the description line is blank in the original π not me showing up to the function with no one-liner. iconic behavior honestly. moving on π
β¨ SYNOPSIS β¨
struct lm3530_platform_data {
enum lm3530_mode mode;
enum lm3530_als_mode als_input_mode;
u8 max_current;
bool pwm_pol_hi;
u8 als_avrg_time;
bool brt_ramp_law;
u8 brt_ramp_fall;
u8 brt_ramp_rise;
u8 als1_resistor_sel;
u8 als2_resistor_sel;
u32 als_vmin;
u32 als_vmax;
u8 brt_val;
struct lm3530_pwm_data pwm_data;
};
look at that layout. the way it's all aligned. ate and left no crumbs π keep it exactly like this, no reformatting, we don't do that here.
π Members π
okay this is the main character section, let's go member by member π
modeβ the mode of operation, i.e. Manual, ALS or PWM. pick your fighter π₯als_input_modeβ selects the source of the ALS input: ALS1/2 or average. choose wisely bestie β¨max_currentβ full scale LED current. the ceiling, the limit, the whole vibe πpwm_pol_hiβ PWM input polarity: active high / active low. two options, both valid, live your truth πals_avrg_timeβ ALS input averaging time. it's giving patience π§ββοΈbrt_ramp_lawβ brightness mapping mode: exponential / linear. math but make it cute πbrt_ramp_fallβ the rate of fall of led current. going down, down π¦brt_ramp_riseβ the rate of rise of led current. and we're going up π₯als1_resistor_selβ internal resistance from the ALS1 input to ground. grounding, literally β‘als2_resistor_selβ internal resistance from the ALS2 input to ground. same energy, second input π«Άals_vminβ als input voltage calibrated for max brightness in mV. yes, max β vmin, that's the bit, don't @ me πals_vmaxβ als input voltage calibrated for min brightness in mV. they're swapped-ish and that's just how it is πbrt_valβ brightness value, range0-127. keep it in bounds bestie, don't be out here freelancing πpwm_dataβ the PWM control functions β and heads up: only valid when the mode is PWM. so if you're not in PWM mode, this field is just sitting there being decorative π
β οΈ tiny vibe check: that last one is a real caveat, not a joke βpwm_datais only valid whenmodeis PWM. treat it accordingly, no cap.
π¦ SEE ALSO π¦
Kernel file ./include/linux/led-lm3530.h β go read the source bestie, it's right there and it's free π
and that's the whole page! π this one came from ./include/linux, dated October 2026, and it's the struct lm3530_platform_data(9) page β so if you ever need to find it again, that's the name, slay πβ¨πΈ
π¦ 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