STRUCT REGULATOR_IRQ_DATA(9)
π struct regulator_irq_data(9) π
okay so bestie, welcome to the Kernel API Manual β today's main character is struct regulator_irq_data, and it's literally the glow-up data holder for regulator error/notification status. yes. that. π
β¨ NAME β¨
struct regulator_irq_data β the regulator error/notification status data struct. it's giving "I hold the receipts" energy. π§Ύπ
π¦ SYNOPSIS π¦
struct regulator_irq_data {
struct regulator_err_state *states;
int num_states;
void *data;
long opaque;
};
no cap, that's the whole vibe. four fields, zero drama (until the IRQ fires, anyway π).
πΈ Members πΈ
statesβ the status structs, one for each of the associated regulators. every regulator gets its own little status buddy π«Άnum_statesβ how many associated regulators there are. the headcount, fr fr.dataβ the driver data pointer that was given atregulator_irq_desc. it's the driver's stuff, being handed back. π₯opaqueβ value storage for the IC driver. the core does not update this β say it with me, the core does not update this. it's yours, IC drivers π
so here's the tea: ICs may want to store the status register value here at map_event, and then compare the contents at the 'renable' callback to see if new problems have been added to status. and if that's the case? it may be desirable to return REGULATOR_ERROR_CLEARED and not REGULATOR_ERROR_ON, which allows the IRQ to fire again and to generate notifications also for the new issues. iconic behavior tbh β¨
π Description π
this structure is passed to the 'map_event' and 'renable' callbacks for reporting regulator status to core. that's it, that's the whole job, and it does it flawlessly. periodt. π
π SEE ALSO π
- Kernel file
./include/linux/regulator/driver.hstruct regulator_ops(9) struct regulator_desc(9)struct regulator_config(9)struct regulator_err_state(9)struct regulator_irq_desc(9)
go read those, iykyk π
and that's a wrap, bestie!! π this little masterpiece lives at ./include/linux/regulator and it's dated October 2026 β go off, struct regulator_irq_data(9), you 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