drivers/usb/fotg210/fotg210-udc.h

Source file repositories/reference/linux-study-clean/drivers/usb/fotg210/fotg210-udc.h

File Facts

System
Linux kernel
Corpus path
drivers/usb/fotg210/fotg210-udc.h
Extension
.h
Size
7979 bytes
Lines
255
Domain
Driver Families
Bucket
drivers/usb
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 fotg210_request {
	struct usb_request	req;
	struct list_head	queue;
};

struct fotg210_ep {
	struct usb_ep		ep;
	struct fotg210_udc	*fotg210;

	struct list_head	queue;
	unsigned		stall:1;
	unsigned		wedged:1;
	unsigned		use_dma:1;

	unsigned char		epnum;
	unsigned char		type;
	unsigned char		dir_in;
	unsigned int		maxp;
	const struct usb_endpoint_descriptor	*desc;
};

struct fotg210_udc {
	spinlock_t		lock; /* protect the struct */
	void __iomem		*reg;

	unsigned long		irq_trigger;

	struct device			*dev;
	struct fotg210			*fotg;
	struct usb_phy			*phy;
	struct usb_gadget		gadget;
	struct usb_gadget_driver	*driver;

	struct fotg210_ep	*ep[FOTG210_MAX_NUM_EP];

	struct usb_request	*ep0_req;	/* for internal request */
	__le16			ep0_data;
	u8			ep0_dir;	/* 0/0x80  out/in */

	u8			reenum;		/* if re-enumeration */
};

#define gadget_to_fotg210(g)	container_of((g), struct fotg210_udc, gadget)

Annotation

Implementation Notes