drivers/nfc/st21nfca/dep.c
Source file repositories/reference/linux-study-clean/drivers/nfc/st21nfca/dep.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/nfc/st21nfca/dep.c- Extension
.c- Size
- 16004 bytes
- Lines
- 658
- Domain
- Driver Families
- Bucket
- drivers/nfc
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/nfc/hci.hst21nfca.h
Detected Declarations
struct st21nfca_atr_reqstruct st21nfca_atr_resstruct st21nfca_psl_reqstruct st21nfca_psl_resstruct st21nfca_dep_req_resfunction st21nfca_tx_workfunction st21nfca_im_send_pdufunction st21nfca_tm_send_atr_resfunction st21nfca_tm_recv_atr_reqfunction st21nfca_tm_send_psl_resfunction ST21NFCA_PSL_REQ_RECV_SPEEDfunction st21nfca_tm_recv_psl_reqfunction st21nfca_tm_send_dep_resfunction st21nfca_tm_recv_dep_reqfunction st21nfca_tm_event_send_datafunction st21nfca_dep_event_receivedfunction st21nfca_im_send_psl_reqfunction st21nfca_im_recv_atr_res_cbfunction st21nfca_im_send_atr_reqfunction st21nfca_im_recv_dep_res_cbfunction st21nfca_im_send_dep_reqfunction st21nfca_dep_initfunction st21nfca_dep_deinitexport st21nfca_tm_send_dep_resexport st21nfca_dep_event_receivedexport st21nfca_im_send_atr_reqexport st21nfca_im_send_dep_reqexport st21nfca_dep_initexport st21nfca_dep_deinit
Annotated Snippet
struct st21nfca_atr_req {
u8 length;
u8 cmd0;
u8 cmd1;
u8 nfcid3[NFC_NFCID3_MAXSIZE];
u8 did;
u8 bsi;
u8 bri;
u8 ppi;
u8 gbi[];
} __packed;
struct st21nfca_atr_res {
u8 length;
u8 cmd0;
u8 cmd1;
u8 nfcid3[NFC_NFCID3_MAXSIZE];
u8 did;
u8 bsi;
u8 bri;
u8 to;
u8 ppi;
u8 gbi[];
} __packed;
struct st21nfca_psl_req {
u8 length;
u8 cmd0;
u8 cmd1;
u8 did;
u8 brs;
u8 fsl;
} __packed;
struct st21nfca_psl_res {
u8 length;
u8 cmd0;
u8 cmd1;
u8 did;
} __packed;
struct st21nfca_dep_req_res {
u8 length;
u8 cmd0;
u8 cmd1;
u8 pfb;
u8 did;
u8 nad;
} __packed;
static void st21nfca_tx_work(struct work_struct *work)
{
struct st21nfca_hci_info *info = container_of(work,
struct st21nfca_hci_info,
dep_info.tx_work);
struct nfc_dev *dev;
struct sk_buff *skb;
dev = info->hdev->ndev;
skb = info->dep_info.tx_pending;
device_lock(&dev->dev);
nfc_hci_send_cmd_async(info->hdev, ST21NFCA_RF_READER_F_GATE,
ST21NFCA_WR_XCHG_DATA, skb->data, skb->len,
info->async_cb, info);
device_unlock(&dev->dev);
kfree_skb(skb);
}
static void st21nfca_im_send_pdu(struct st21nfca_hci_info *info,
struct sk_buff *skb)
{
info->dep_info.tx_pending = skb;
schedule_work(&info->dep_info.tx_work);
}
static int st21nfca_tm_send_atr_res(struct nfc_hci_dev *hdev,
struct st21nfca_atr_req *atr_req)
{
struct st21nfca_atr_res *atr_res;
struct sk_buff *skb;
size_t gb_len;
int r;
struct st21nfca_hci_info *info = nfc_hci_get_clientdata(hdev);
gb_len = atr_req->length - sizeof(struct st21nfca_atr_req);
skb = alloc_skb(atr_req->length + 1, GFP_KERNEL);
if (!skb)
Annotation
- Immediate include surface: `net/nfc/hci.h`, `st21nfca.h`.
- Detected declarations: `struct st21nfca_atr_req`, `struct st21nfca_atr_res`, `struct st21nfca_psl_req`, `struct st21nfca_psl_res`, `struct st21nfca_dep_req_res`, `function st21nfca_tx_work`, `function st21nfca_im_send_pdu`, `function st21nfca_tm_send_atr_res`, `function st21nfca_tm_recv_atr_req`, `function st21nfca_tm_send_psl_res`.
- Atlas domain: Driver Families / drivers/nfc.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.