drivers/usb/renesas_usbhs/mod.h
Source file repositories/reference/linux-study-clean/drivers/usb/renesas_usbhs/mod.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/renesas_usbhs/mod.h- Extension
.h- Size
- 4312 bytes
- Lines
- 180
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/spinlock.hlinux/usb/renesas_usbhs.hcommon.h
Detected Declarations
struct usbhs_irq_statestruct usbhs_modstruct usbhs_mod_infofunction usbhs_mod_host_probefunction usbhs_mod_host_removefunction usbhs_mod_gadget_probefunction usbhs_mod_gadget_remove
Annotated Snippet
struct usbhs_irq_state {
u16 intsts0;
u16 intsts1;
u16 brdysts;
u16 nrdysts;
u16 bempsts;
};
struct usbhs_mod {
char *name;
/*
* entry point from common.c
*/
int (*start)(struct usbhs_priv *priv);
int (*stop)(struct usbhs_priv *priv);
/*
* INTSTS0
*/
/* DVST (DVSQ) */
int (*irq_dev_state)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
/* CTRT (CTSQ) */
int (*irq_ctrl_stage)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
/* BEMP / BEMPSTS */
int (*irq_empty)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
u16 irq_bempsts;
/* BRDY / BRDYSTS */
int (*irq_ready)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
u16 irq_brdysts;
/*
* INTSTS1
*/
/* ATTCHE */
int (*irq_attch)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
/* DTCHE */
int (*irq_dtch)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
/* SIGN */
int (*irq_sign)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
/* SACK */
int (*irq_sack)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
struct usbhs_priv *priv;
};
struct usbhs_mod_info {
struct usbhs_mod *mod[USBHS_MAX];
struct usbhs_mod *curt; /* current mod */
/*
* INTSTS0 :: VBINT
*
* This function will be used as autonomy mode (runtime_pwctrl == 0)
* when the platform doesn't have own get_vbus function.
*
* This callback cannot be member of "struct usbhs_mod" because it
* will be used even though host/gadget has not been selected.
*/
int (*irq_vbus)(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state);
/*
* This function will be used on any gadget mode. To simplify the code,
* this member is in here.
*/
int (*get_vbus)(struct platform_device *pdev);
};
/*
* for host/gadget module
*/
struct usbhs_mod *usbhs_mod_get(struct usbhs_priv *priv, int id);
struct usbhs_mod *usbhs_mod_get_current(struct usbhs_priv *priv);
Annotation
- Immediate include surface: `linux/spinlock.h`, `linux/usb/renesas_usbhs.h`, `common.h`.
- Detected declarations: `struct usbhs_irq_state`, `struct usbhs_mod`, `struct usbhs_mod_info`, `function usbhs_mod_host_probe`, `function usbhs_mod_host_remove`, `function usbhs_mod_gadget_probe`, `function usbhs_mod_gadget_remove`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: source 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.