STRUCT LPG_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct lpg_data β€” initialization data ✨

okay bestie, welcome to the Kernel API Manual πŸ’– this little cutie is struct lpg_data, and no cap, it's literally the initialization data β€” the starter pack, the get-ready-with-me, the whole vibe before anything actually spins up. It lives over in struct lpg_data(9) and it's lowkey just a bag of numbers and bools that tell the LPG how it's built. πŸŽ€


🌸 SYNOPSIS 🌸

here's the whole glow-up, character for character, don't touch:

struct lpg_data {
    unsigned int lut_base;
    unsigned int lut_size;
    unsigned int triled_base;
    bool triled_has_atc_ctl;
    bool triled_has_src_sel;
    int num_channels;
    const struct lpg_channel_data *channels;
 };

like… she's compact, she's iconic, she's giving struct energy πŸ’…


πŸ¦‹ Members πŸ¦‹

one by one, so we're on the same page fr fr:

  • lut_base β€” the base address of the LUT block ✨ that's where the LUT lives, address-wise.
  • lut_size β€” how many entries are in the LUT. just a count, bestie πŸ”’
  • triled_base β€” the base address of TRILED. yes, another address, she's got range 🏠
  • triled_has_atc_ctl β€” a bool, and it's true if there's a TRI_LED_ATC_CTL register. if that register is missing, it's not true. simple as 😌
  • triled_has_src_sel β€” another bool, true if there's a TRI_LED_SRC_SEL register. vibe check for that specific register 🫢
  • num_channels β€” the number of channels in the LPG. how many we're working with, periodt πŸ“Š
  • channels β€” a const struct lpg_channel_data *, aka the list of channel initialization data. the actual lineup, the main characters πŸ‘‘
heads up babes: a bunch of these are just unsigned int addresses and counts, and two of them are bools that are only true when their specific register exists. don't read more into it than that πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

go off and read these next, iykyk:

  • Kernel file ./drivers/leds/rgb/leds-qcom-lpg.c πŸ”₯
  • struct lpg_channel(9)
  • struct lpg_led(9)
  • struct lpg(9)
  • struct lpg_channel_data(9)

okay that's the whole page, mwah πŸ’‹ this diva comes to you from ./drivers/leds/rgb, dated October 2026, out of the Kernel API Manual, and the star of the show is, of course, struct lpg_data(9). go be great with your init data, bestie πŸŒˆβ­πŸ¦‹

πŸ“¦ where this page comes from