nfc_allocate_device(9)
β¨ nfc_allocate_device β¨
Okay so bestie, welcome to the Kernel API Manual π β this is the page for nfc_allocate_device(9), and honestly it's giving "birth of an NFC device" energy. Let's get into it π
πΈ NAME πΈ
nfc_allocate_device β allocate a new nfc device π¦
Like, you're literally bringing a whole new NFC device into existence. Main character energy fr fr π
β¨ SYNOPSIS β¨
struct nfc_dev * nfc_allocate_device (const struct nfc_ops *ops , u32
supported_protocols , int tx_headroom , int tx_tailroom );
That's the whole signature, no cap. Four arguments, one struct nfc_dev * coming back at you π
π ARGUMENTS π
opsβ device operations. It's theconst struct nfc_ops *β all the behaviour your device is gonna have π«supported_protocolsβ NFC protocols supported by the device. Au32bitmask situation, iykyk π₯tx_headroomβ reserved space at beginning ofskbπΈtx_tailroomβ reserved space at end ofskbπ¦
Headroom at the front, tailroom at the back, and the payload living its best life in the middle. Periodt β¨
π«Ά SEE ALSO π«Ά
Kernel file ./net/nfc/core.c β that's where the magic lives, bestie π§
And the whole friend group of related calls:
nfc_fw_download_done(9)nfc_dev_up(9)nfc_dev_down(9)nfc_start_poll(9)nfc_stop_poll(9)nfc_activate_target(9)nfc_deactivate_target(9)nfc_data_exchange(9)nfc_alloc_send_skb(9)nfc_alloc_recv_skb(9)nfc_targets_found(9)nfc_target_lost(9)nfc_register_device(9)nfc_unregister_rfkill(9)nfc_remove_device(9)nfc_unregister_device(9)
Go read them all, they're iconic π
Lowkey a reminder from your girl: these entries are shorthand in this preview β nfc_unregister_rfkill(9) is listed here as-is even though the surrounding pair is about registering/unregistering. Keep the exact reference, don't "fix" it, bestie π
Sign-off time! π This page lives under ./net/nfc, and the manual says October 2026 π β so congratulations to you and to future-you reading this in 2026, 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