STRUCT LPG_DATA(9)
β¨ 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β abool, and it's true if there's aTRI_LED_ATC_CTLregister. if that register is missing, it's not true. simple as πtriled_has_src_selβ anotherbool, true if there's aTRI_LED_SRC_SELregister. vibe check for that specific register π«Άnum_channelsβ the number of channels in the LPG. how many we're working with, periodt πchannelsβ aconst 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 justunsigned intaddresses and counts, and two of them arebools 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
- 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