STRUCT MTU3(9)
π struct mtu3(9) β like, the whole entire vibe
okay so bestie, welcome to the Kernel API Manual β¨ this one's all about struct mtu3, and it's literally the device driver instance data. that's it, that's the whole NAME section, she's concise π
πΈ SYNOPSIS πΈ
here's the whole struct, character for character, no cap β don't you dare touch a single semicolon:
struct mtu3 {
spinlock_t lock;
struct ssusb_mtk *ssusb;
struct device *dev;
void __iomem *mac_base;
void __iomem *ippc_base;
int irq;
struct mtu3_fifo_info tx_fifo;
struct mtu3_fifo_info rx_fifo;
struct mtu3_ep *ep_array;
struct mtu3_ep *in_eps;
struct mtu3_ep *out_eps;
struct mtu3_ep *ep0;
int num_eps;
int slot;
int active_ep;
struct dma_pool *qmu_gpd_pool;
enum mtu3_g_ep0_state ep0_state;
struct usb_gadget g;
struct usb_gadget_driver *gadget_driver;
struct mtu3_request ep0_req;
u8 setup_buf[EP0_RESPONSE_BUF];
enum usb_device_speed max_speed;
enum usb_device_speed speed;
unsigned is_active:1;
unsigned may_wakeup:1;
unsigned is_self_powered:1;
unsigned test_mode:1;
unsigned softconnect:1;
unsigned u1_enable:1;
unsigned u2_enable:1;
unsigned u3_capable:1;
unsigned delayed_status:1;
unsigned gen2cp:1;
unsigned connected:1;
unsigned async_callbacks:1;
unsigned separate_fifo:1;
u8 address;
u8 test_mode_nr;
u32 hw_version;
};
like?? the bitfields at the end are giving main character energy, they're all unsigned ... :1 and there are SO many of them π but we respect her π«Ά
π Members π
okay this is the part where we go member by member, and ngl these ones have β¨loreβ¨:
slotβ it'sMTU3_U2_IP_SLOT_DEFAULTwhen you're U2 IP only, andMTU3_U3_IP_SLOT_DEFAULTwhen you're U3 IP. pick your fighter πep0_reqβ a dummy request, used while handling standard USB requests for GET_STATUS and SET_SEL. she's fake but she's doing important work πsetup_bufβ the ep0 response buffer for GET_STATUS and SET_SEL requests. note that it's au8 setup_buf[EP0_RESPONSE_BUF], bestie, exact size and everything πmay_wakeupβ means the device's remote wakeup is enabled. so like, she's allowed to wake you up πis_self_poweredβ this one is reported in device status and the config descriptor. double duty, iconic πu3_capableβ is capable of supporting USB3. slay βdelayed_statusβ true when function drivers ask for delayed status. she's on β¨delayβ¨ fr frgen2cpβ compatible with USB3 Gen2 IP. gen2 coded π₯
lowkey notice how the manpage only spells out these specific members? yeah. the rest of the struct is in the SYNOPSIS up there β we kept every single field, we just didn't invent commentary that wasn't in the source. don't come for me π
π¦ SEE ALSO π¦
go read these next, bestie, they're all in the kernel file ./drivers/usb/mtu3/mtu3.h:
enum mtu3_g_ep0_state(9)enum mtu3_dr_force_mode(9)struct mtu3_fifo_info(9)struct qmu_gpd(9)struct mtu3_gpd_ring(9)struct otg_switch_mtk(9)struct ssusb_mtk(9)struct mtu3_ep(9)
like, that's a whole friend group right there π go say hi to all of them π«Ά
and that's the page!! this lil beauty lives at ./drivers/usb/mtu3 and it's dated October 2026 β put that in your calendar, periodt π
β¨πΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms