builtin_pci_driver(9)
π builtin_pci_driver β from the Kernel API Manual, section 9
okay bestie, so this one is builtin_pci_driver(9) and it lives in the Kernel API Manual, and honestly it's giving "tiny macro, huge slay" energy. Let's get into it π
β¨ NAME β¨
builtin_pci_driver β the helper macro for registering a PCI driver. that's it, that's the whole vibe π¦
β¨ SYNOPSIS β¨
builtin_pci_driver (__pci_driver );
that's literally the whole thing. no extra nonsense, no secret params. iconic behavior fr fr π
β¨ ARGUMENTS β¨
__pci_driverβ apci_driverstruct. that's the one (1) thing you hand over, bestie, and it's the struct itself, no cap πΈ
β¨ DESCRIPTION β¨
so here's the tea: this is a helper macro for PCI drivers that don't do anything special in their init code. like, nothing cute happens at init, it's just "hey kernel, register my driver, thanks, bye." π«Ά
and because that's such a common situation, this macro eliminates a lot of boilerplate β all that repetitive setup code? gone. not me crying tears of joy πβ¨
β οΈ real talk, two things you gotta remember: each driver may only use this macro once, and calling it replacesdevice_initcall(...). so don't double up and don't also go callingdevice_initcallyourself, that's the whole point, bestie π
β¨ SEE ALSO β¨
the whole friend group came through π₯ (and heads up, these live in the kernel file ./include/linux/pci.h):
enum pci_interrupt_pin(9)pci_channel_state_t(9)pci_is_bridge(9)pci_is_vga(9)pci_is_display(9)struct pci_driver(9)PCI_DEVICE(9)PCI_DEVICE_DRIVER_OVERRIDE(9)PCI_DRIVER_OVERRIDE_DEVICE_VFIO(9)PCI_DEVICE_SUB(9)PCI_DEVICE_CLASS(9)PCI_VDEVICE(9)PCI_VDEVICE_SUB(9)PCI_DEVICE_DATA(9)pcie_capability_clear_and_set_word(9)pci_bus_for_each_resource(9)module_pci_driver(9)pci_irq_type(9)pci_irqd_intx_xlate(9)pci_resource_is_io(9)pci_resource_is_mem(9)pci_pcie_cap(9)pci_is_pcie(9)pcie_caps_reg(9)pci_pcie_type(9)pcie_find_root_port(9)pci_vpd_alloc(9)pci_vpd_find_id_string(9)pci_vpd_find_ro_info_keyword(9)pci_vpd_check_csum(9)pci_ari_enabled(9)pci_is_thunderbolt_attached(9)
and that's the page!! π mwah π
so like, this one's filed under ./include/linux (that's the source spot, periodt) and it's dated October 2026, which is lowkey futuristic of it ngl β girlies really said "see you in the future" and meant it. go register some PCI drivers, bestie, you're gonna slay ππ
π¦ 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