drivers/nfc/nxp-nci/nxp-nci.h

Source file repositories/reference/linux-study-clean/drivers/nfc/nxp-nci/nxp-nci.h

File Facts

System
Linux kernel
Corpus path
drivers/nfc/nxp-nci/nxp-nci.h
Extension
.h
Size
1742 bytes
Lines
79
Domain
Driver Families
Bucket
drivers/nfc
Inferred role
Driver Families: implementation source
Status
source 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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct nxp_nci_phy_ops {
	int (*set_mode)(void *id, enum nxp_nci_mode mode);
	int (*write)(void *id, struct sk_buff *skb);
};

struct nxp_nci_fw_info {
	char name[NFC_FIRMWARE_NAME_MAXSIZE + 1];
	const struct firmware *fw;

	size_t size;
	size_t written;

	const u8 *data;
	size_t frame_size;

	struct work_struct work;
	struct completion cmd_completion;

	int cmd_result;
};

struct nxp_nci_info {
	struct nci_dev *ndev;
	void *phy_id;
	struct device *pdev;

	enum nxp_nci_mode mode;

	const struct nxp_nci_phy_ops *phy_ops;
	unsigned int max_payload;

	struct mutex info_lock;

	struct nxp_nci_fw_info fw_info;
};

int nxp_nci_fw_download(struct nci_dev *ndev, const char *firmware_name);
void nxp_nci_fw_work(struct work_struct *work);
void nxp_nci_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb);
void nxp_nci_fw_work_complete(struct nxp_nci_info *info, int result);

int nxp_nci_probe(void *phy_id, struct device *pdev,
		  const struct nxp_nci_phy_ops *phy_ops,
		  unsigned int max_payload,
		  struct nci_dev **ndev);
void nxp_nci_remove(struct nci_dev *ndev);

#endif /* __LOCAL_NXP_NCI_H_ */

Annotation

Implementation Notes