devm_mfd_add_devices(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_mfd_add_devices(9)

okay so bestie, welcome to the Kernel API Manual β€” today's main character is devm_mfd_add_devices, and honestly? she's giving "resource manager energy" and we're obsessed ✨


🌸 NAME

devm_mfd_add_devices β€” the resource managed version of mfd_add_devices() πŸŽ€

like, same vibes as the original, but the kernel cleans up after you so you don't have to. no cap.


πŸ¦‹ SYNOPSIS

int devm_mfd_add_devices (struct device *dev , int id , const struct
mfd_cell *cells , int n_devs , struct resource *mem_base , int irq_base
, struct irq_domain *domain );

✨ ARGUMENTS

  • dev β€” pointer to the parent device. the momager of this whole situation πŸ‘‘
  • id β€” can be PLATFORM_DEVID_AUTO to let the Platform API take care of device numbering for you (slay, delegation), or it gets added to a device's cell_id. your call, bestie πŸ’…
  • cells β€” array of (struct mfd_cell)s describing the child devices. every child gets a little description card πŸ“‡
  • n_devs β€” the number of child devices to register. count 'em πŸ”’
  • mem_base β€” parent register range resource for the child devices πŸ—ΊοΈ
  • irq_base β€” base of the range of virtual interrupt numbers allocated for this MFD device. unused if domain is specified ⚠️ so like, don't bother, iykyk
  • domain β€” the interrupt domain to create mappings for hardware interrupts for πŸ§šβ€β™€οΈ

πŸ”₯ DESCRIPTION

Returns 0 on success, or an appropriate negative error number on failure. that's it, that's the vibe check πŸ’€

And the iconic part: all child devices of the MFD will automatically be removed when it gets unbinded 🫢 literally no manual cleanup, the devm_ prefix is doing the work for you, periodt.


🌈 SEE ALSO


and that's the whole page, bestie!! πŸ“ source/version: ./drivers/mfd Β· dated October 2026 Β· devm_mfd_add_devices(9) β€” go forth and register those child devices πŸ’–βœ¨

πŸ“¦ where this page comes from