__devm_pci_epc_create(9)
π __devm_pci_epc_create π
okay bestie, welcome to the __devm_pci_epc_create(9) page β yes that's the man page name, and yes it's a mouthful, but we move. This is the kernel API manual vibe, and this lil function is literally the main character of EPC device creation. π
β¨ NAME β¨
__devm_pci_epc_create β create a new endpoint controller (EPC) device π¦
πΈ SYNOPSIS πΈ
struct pci_epc * __devm_pci_epc_create (struct device *dev , const
struct pci_epc_ops *ops , struct module *owner );
that's the whole signature, copy it exactly bestie, no typos allowed π
π«Ά ARGUMENTS π«Ά
devβ the device that's creating the new EPC. like, the one holding the aux cord here π§opsβ the function pointers for performing EPC operations. all the actual behaviour lives here β¨ownerβ the owner of the module that creates the EPC device. gotta claim your work, periodt π
π DESCRIPTION π
so you invoke this when you wanna create a new EPC device and add it to the pci_epc class. slay. π
and while it's at it? it also associates the device with the pci_epc using devres. the way that devres just handles the lifecycle for you, honestly iconic π§
here's the tea on cleanup: on driver detach, the release function is invoked on the devres data, and then the devres data is freed. no manual teardown drama, no leaked vibes πβ¨
ngl, the whole point is that devres does the boring part for you β but remember the release function runs first, and then the devres data gets freed. order matters, iykyk π
π¦ SEE ALSO π¦
the kernel file lives at ./drivers/pci/endpoint/pci-epc-core.c and like, here's the whole friend group π«Ά:
pci_epc_put(9)pci_epc_get(9)pci_epc_get_first_free_bar(9)pci_epc_get_next_free_bar(9)pci_epc_get_features(9)pci_epc_get_aux_resources_count(9)pci_epc_get_aux_resources(9)pci_epc_stop(9)pci_epc_start(9)pci_epc_raise_irq(9)pci_epc_map_msi_irq(9)pci_epc_get_msi(9)pci_epc_set_msi(9)pci_epc_get_msix(9)pci_epc_set_msix(9)pci_epc_unmap_addr(9)pci_epc_map_addr(9)pci_epc_mem_map(9)pci_epc_mem_unmap(9)pci_epc_clear_bar(9)pci_epc_set_bar(9)pci_epc_bar_size_to_rebar_cap(9)pci_epc_write_header(9)pci_epc_add_epf(9)pci_epc_remove_epf(9)pci_epc_linkup(9)pci_epc_linkdown(9)pci_epc_init_notify(9)pci_epc_notify_pending_init(9)pci_epc_deinit_notify(9)pci_epc_bus_master_enable_notify(9)pci_epc_destroy(9)__pci_epc_create(9)
and that's the page!! π this one's filed under ./drivers/pci/endpoint, dated October 2026 β so yeah, mark your calendar bestie, we're ahead of the curve πβ¨ go forth and create EPC devices responsibly, mwah π
π₯
π¦ 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