regulator_irq_helper(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ regulator_irq_helper(9) β€” like, the actual manual page, bestie

okay so this is a page from the Kernel API Manual, and it's about regulator_irq_helper β€” the function that registers your IRQ based regulator event/error notifier. yes it's a lot of words. no I'm not scared of it. let's go 🫢


✨ NAME ✨

regulator_irq_helper β€” register IRQ based regulator event/error notifier

like, it hooks your regulator errors up to an IRQ so you actually hear about them. main character behavior honestly πŸ‘‘


🌸 SYNOPSIS 🌸

void * regulator_irq_helper (struct device *dev , const struct
regulator_irq_desc *d , int irq , int irq_flags , int common_errs , int
*per_rdev_errs , struct regulator_dev **rdev , int rdev_amount );

eight arguments. EIGHT. and every single one of them matters, so don't come for me πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device providing the IRQs. like, whose IRQs are these? theirs. it's giving source of truth πŸ’…
  • d β€” the IRQ helper descriptor. that's the const struct regulator_irq_desc * one. it's the blueprint, the vibe documentation, the plan.
  • irq β€” the IRQ used to inform events/errors to be notified. this is the actual interrupt line doing the talking πŸ¦‹
  • irq_flags β€” extra IRQ flags that get OR'ed with the default IRQF_ONESHOT when requesting the (threaded) irq. so you're adding to IRQF_ONESHOT, not replacing it. noted. don't mess it up πŸ™ˆ
  • common_errs β€” errors which can be flagged by this IRQ for all rdevs. when the IRQ is re-enabled these errors will be cleared from all associated regulators. and here's the little tip: use this instead of per_rdev_errs if you use regulator_irq_map_event_simple for event mapping. iykyk πŸ’–
  • per_rdev_errs β€” optional error flag array describing errors specific for only some of the regulators. these errors will be or'ed with common errors. if this is given, the array should contain rdev_amount flags. can be set to NULL if there is no regulator specific error flags for this IRQ. optional means optional, bestie 🌈
  • rdev β€” array of pointers to regulators associated with this IRQ. struct regulator_dev ** β€” yes, double pointer. yes, that's on purpose πŸ’€
  • rdev_amount β€” amount of regulators associated with this IRQ. and remember, this number doubles as the required size of per_rdev_errs. consistency queen πŸŽ€

⭐ RETURN ⭐

handle to irq_helper or an ERR_PTR encoded negative error number.

so like... check it. please check it. an ERR_PTR encoded negative error number is not a handle and it will not slay for you 😭


πŸ¦‹ SEE ALSO πŸ¦‹


real talk: this page lives in ./drivers/regulator, dated October 2026. that's the footer, that's the vibe, no cap πŸ’œ

periodt. now go register that notifier ✨🧚

πŸ“¦ where this page comes from