devm_regulator_irq_helper(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_regulator_irq_helper(9) β€” from the Kernel API Manual, bestie

okay so picture this: it's a kernel API manual page, it's called devm_regulator_irq_helper(9), and it's literally the resource managed registration of an IRQ based regulator event/error notifier. like, that's the whole vibe. no cap. ✨


🌸 NAME 🌸

devm_regulator_irq_helper β€” resource managed registration of IRQ based regulator event/error notifier. it's giving "I handle your IRQ-driven regulator events AND I clean up after myself." main character energy fr fr πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

void * devm_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 );

she takes eight arguments, she's high maintenance, we love her 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device whose lifetime the helper's lifetime is bound to. basically they're attached at the hip, devm-style πŸ’–
  • d β€” the IRQ helper descriptor. the whole blueprint of the operation, iykyk.
  • irq β€” the IRQ that's used to inform events/errors to be notified. the messenger 🧚
  • irq_flags β€” extra IRQ flags, and they get OR'ed with the default IRQF_ONESHOT when requesting the (threaded) irq. so like, you're adding sprinkles to the default sprinkle situation ✨
  • common_errs β€” errors which can be flagged by this IRQ for all rdevs. and here's the tea: when the IRQ is re-enabled, these errors will be cleared from all associated regulators. automatic cleanup, we stan 🌈
  • per_rdev_errs β€” optional error flag array describing errors specific to only some of the regulators. these errors will be or'ed with common errors. if you pass this, the array should contain rdev_amount flags. can be set to NULL if there are no regulator specific error flags for this IRQ. optional queen behavior πŸ‘‘
  • rdev β€” array of pointers to regulators associated with this IRQ.
  • rdev_amount β€” how many regulators are associated with this IRQ. the headcount bestie πŸ’€

⭐ RETURN ⭐

you get a handle to irq_helper, or an ERR_PTR encoded negative error number. so like... check it, bestie. don't just assume it slayed πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/regulator/devres.c, plus the whole friend group:


and that's the page, periodt πŸŽ€

sign-off tea: this whole masterpiece lives in ./drivers/regulator, and it's dated October 2026. the page itself is devm_regulator_irq_helper(9). go read it again, it's iconic πŸ’œπŸŒΈ
πŸ“¦ where this page comes from