STRUCT LM3530_PLATFORM_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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, range 0-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_data is only valid when mode is 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