ENUM NFC_COMMANDS(9)
π enum nfc_commands(9) π
okay so, bestie, welcome to the kernel API manual β this is the page for enum nfc_commands, which is literally just the list of every nfc command your kernel understands. yes, every single one. buckle up π
β¨ NAME β¨
enum nfc_commands β the supported nfc commands, periodt π
πΈ SYNOPSIS πΈ
enum nfc_commands {
NFC_CMD_UNSPEC ,
NFC_CMD_GET_DEVICE ,
NFC_CMD_DEV_UP ,
NFC_CMD_DEV_DOWN ,
NFC_CMD_DEP_LINK_UP ,
NFC_CMD_DEP_LINK_DOWN ,
NFC_CMD_START_POLL ,
NFC_CMD_STOP_POLL ,
NFC_CMD_GET_TARGET ,
NFC_EVENT_TARGETS_FOUND ,
NFC_EVENT_DEVICE_ADDED ,
NFC_EVENT_DEVICE_REMOVED ,
NFC_EVENT_TARGET_LOST ,
NFC_EVENT_TM_ACTIVATED ,
NFC_EVENT_TM_DEACTIVATED ,
NFC_CMD_LLC_GET_PARAMS ,
NFC_CMD_LLC_SET_PARAMS ,
NFC_CMD_ENABLE_SE ,
NFC_CMD_DISABLE_SE ,
NFC_CMD_LLC_SDREQ ,
NFC_EVENT_LLC_SDRES ,
NFC_CMD_FW_DOWNLOAD ,
NFC_EVENT_SE_ADDED ,
NFC_EVENT_SE_REMOVED ,
NFC_EVENT_SE_CONNECTIVITY ,
NFC_EVENT_SE_TRANSACTION ,
NFC_CMD_GET_SE ,
NFC_CMD_SE_IO ,
NFC_CMD_ACTIVATE_TARGET ,
NFC_CMD_VENDOR ,
NFC_CMD_DEACTIVATE_TARGET
};
look at her go π so many little constants. and like, some of them are CMDs and some are EVENTs β that's not a typo, that's the whole vibe of this enum, ok? π
π¦ Constants π¦
NFC_CMD_UNSPECβ the unspecified command. the "idk what this is" of commands πNFC_CMD_GET_DEVICEβ request info about a device (needsNFC_ATTR_DEVICE_INDEX), or do a dump request to get a list of all nfc devices. two-for-one deal β¨NFC_CMD_DEV_UPβ turn on the nfc device (needsNFC_ATTR_DEVICE_INDEX). wakey wakey πNFC_CMD_DEV_DOWNβ turn off the nfc device (needsNFC_ATTR_DEVICE_INDEX). nini π΄NFC_CMD_DEP_LINK_UPβ no description in the original, it just says-- undescribed --π the devs really said "you'll find out"NFC_CMD_DEP_LINK_DOWNβ same situation, also-- undescribed --πNFC_CMD_START_POLLβ start polling for targets using the protocols you pass in (needsNFC_ATTR_DEVICE_INDEXandNFC_ATTR_PROTOCOLS). both, bestie, not one π₯NFC_CMD_STOP_POLLβ stop polling for targets (needsNFC_ATTR_DEVICE_INDEX) βNFC_CMD_GET_TARGETβ dump every target that the previous poll found (needsNFC_ATTR_DEVICE_INDEX) π―NFC_EVENT_TARGETS_FOUNDβ event fired when a new target is found; it sendsNFC_ATTR_DEVICE_INDEXβNFC_EVENT_DEVICE_ADDEDβ event fired when a new device is registered (yes, the original spells it "registred", we're leaving that exactly as-is π); it sendsNFC_ATTR_DEVICE_NAME,NFC_ATTR_DEVICE_INDEXandNFC_ATTR_PROTOCOLSπ«ΆNFC_EVENT_DEVICE_REMOVEDβ event fired when a device is removed; it sendsNFC_ATTR_DEVICE_INDEXπNFC_EVENT_TARGET_LOSTβ-- undescribed --, another mystery icon π»NFC_EVENT_TM_ACTIVATEDβ event fired when the adapter is activated in target mode π₯NFC_EVENT_TM_DEACTIVATEDβ event fired when the adapter is deactivated from target mode π§NFC_CMD_LLC_GET_PARAMSβ request theLTO,RW, andMIUXparameters for a device πNFC_CMD_LLC_SET_PARAMSβ set one or more of theLTO,RW, andMIUXparameters for a device. ok this one's got rules, so listen up:LTOmust be set before the link is up, otherwise-EINPROGRESSgets returned.RWandMIUXcan be set at anytime and will be passed in subsequentCONNECTandCCmessages. and if one of the passed parameters is wrong, none of them get set and you get-EINVALback. all-or-nothing energy, we respect it πNFC_CMD_ENABLE_SEβ enable the physical link to a specific secure element. once it's enabled, that secure element handles card emulation mode β like, starting a poll from a device that has a secure element enabled means we want to do SE based card emulation πNFC_CMD_DISABLE_SEβ disable the physical link to a specific secure element π«NFC_CMD_LLC_SDREQβ-- undescribed --bestie the docs are simply not there π«NFC_EVENT_LLC_SDRESβ also-- undescribed --, twin of the one above πNFC_CMD_FW_DOWNLOADβ a request to load/flash firmware, or an event to inform that some firmware was loaded. dual-purpose queen πNFC_EVENT_SE_ADDEDβ event fired when a new secure element is discovered. typically this gets sent whenever there's a new NFC controller with either an embedded SE or an UICC one connected to it through SWP β¨NFC_EVENT_SE_REMOVEDβ event fired when a secure element is removed from the system, as a consequence of e.g. an NFC controller being unplugged πNFC_EVENT_SE_CONNECTIVITYβ fired whenever a secure element is requesting connectivity access. for example, a UICC SE may need to talk to a sleeping modem and will notify that need by sending this event β and then it's up to userspace to decide whether it wakes the modem up or not π΄ your call, bestieNFC_EVENT_SE_TRANSACTIONβ sent when an application running on a specific SE notifies us about the end of a transaction. the parameter for this event is the application ID (AID) π§ΎNFC_CMD_GET_SEβ dump all discovered secure elements from an NFC controller πNFC_CMD_SE_IOβ send/receive APDUs to/from the selected secure element πNFC_CMD_ACTIVATE_TARGETβ request the NFC controller to reactivate the target πNFC_CMD_VENDORβ vendor specific command, meant to be implemented directly from the driver so it can support hardware specific operations. driver girlies, this one's yours π§NFC_CMD_DEACTIVATE_TARGETβ request the NFC controller to deactivate the target π
π SEE ALSO π
Kernel file ./include/uapi/linux/nfc.h and enum nfc_attrs(9) β go read that one next, iykyk π
and that's the page!! π«Ά shoutout to ./include/uapi/linux, October 2026 for the source and the date β mwah, love u, thanks for the enum πβ¨π
π¦ 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