drivers/nfc/nfcmrvl/fw_dnld.h

Source file repositories/reference/linux-study-clean/drivers/nfc/nfcmrvl/fw_dnld.h

File Facts

System
Linux kernel
Corpus path
drivers/nfc/nfcmrvl/fw_dnld.h
Extension
.h
Size
1953 bytes
Lines
88
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 nfcmrvl_fw_uart_config {
	uint8_t flow_control;
	uint32_t baudrate;
} __packed;

struct nfcmrvl_fw_i2c_config {
	uint32_t clk;
} __packed;

struct nfcmrvl_fw_spi_config {
	uint32_t clk;
} __packed;

struct nfcmrvl_fw_binary_config {
	uint32_t offset;
	union {
		void *config;
		struct nfcmrvl_fw_uart_config uart;
		struct nfcmrvl_fw_i2c_config i2c;
		struct nfcmrvl_fw_spi_config spi;
		uint8_t reserved[64];
	};
} __packed;

struct nfcmrvl_fw {
	uint32_t magic;
	uint32_t ref_clock;
	uint32_t phy;
	struct nfcmrvl_fw_binary_config bootrom;
	struct nfcmrvl_fw_binary_config helper;
	struct nfcmrvl_fw_binary_config firmware;
	uint8_t reserved[64];
} __packed;

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

	const struct nfcmrvl_fw *header;
	const struct nfcmrvl_fw_binary_config *binary_config;

	int state;
	int substate;
	int offset;
	int chunk_len;

	struct workqueue_struct	*rx_wq;
	struct work_struct rx_work;
	struct sk_buff_head rx_q;

	struct timer_list timer;
};

int nfcmrvl_fw_dnld_init(struct nfcmrvl_private *priv);
void nfcmrvl_fw_dnld_deinit(struct nfcmrvl_private *priv);
void nfcmrvl_fw_dnld_abort(struct nfcmrvl_private *priv);
int nfcmrvl_fw_dnld_start(struct nci_dev *ndev, const char *firmware_name);
void nfcmrvl_fw_dnld_recv_frame(struct nfcmrvl_private *priv,
				struct sk_buff *skb);

#endif

Annotation

Implementation Notes