STRUCT ROCKCHIP_USB2PHY_PORT(9)
π struct rockchip_usb2phy_port(9) π
okay bestie, welcome to the Kernel API Manual β¨ β we're looking at struct rockchip_usb2phy_port today and honestly? she's doing a lot. this is the usb-phy port data struct, and by the end of this page you're gonna know every single field in her little group chat π«Ά
β¨ NAME β¨
struct rockchip_usb2phy_port β usb-phy port data. that's the whole vibe. port data. iconic. π
πΈ SYNOPSIS πΈ
struct rockchip_usb2phy_port {
struct phy *phy;
unsigned int port_id;
bool suspended;
bool vbus_attached;
bool host_disconnect;
int bvalid_irq;
int id_irq;
int ls_irq;
int otg_mux_irq;
struct mutex mutex;
struct delayed_work chg_work;
struct delayed_work otg_sm_work;
struct delayed_work sm_work;
const struct rockchip_usb2phy_port_cfg *port_cfg;
struct notifier_block event_nb;
enum usb_otg_state state;
enum usb_dr_mode mode;
};
like, look at her. so many fields. so much going on. let's do a vibe check on every single one π
π¦ Members π¦
the basics π
phyβ generic phy. that's it. that's the pointer. she's just a girl πport_idβ flag for otg port or host port. so you know which one you're dealing with, ykwim?suspendedβ phy suspended flag. is she napping? this tells you π¦
the status flags β¨
vbus_attachedβ otg device vbus status. literally just: is the vbus attached or not π₯host_disconnectβ usb host disconnect status. highkey important bestie, don't skip her π
the IRQ numbers π
bvalid_irqβ IRQ number assigned for vbus valid rise detection. she detects the rise, no cap β¨id_irqβ IRQ number assigned for ID pin detection.ls_irqβ IRQ number assigned for linestate detection. linestate! she's watching πotg_mux_irqβ IRQ number which multiplex otg-id/otg-bvalid/linestate irqs to one irq in otg-port. okay so she's out here multiplexing three irqs into one, that's giving main character energy fr fr π
the locking + work stuff π§
mutexβ for register updating insm_work. keep it locked bestie, no data races on my watch πchg_workβ charge detect work.otg_sm_workβ OTG state machine work.sm_workβ HOST state machine work.
the config + events + state π
port_cfgβ port register configuration, assigned by driver data. she didn't pick her own config, the driver data assigned it. iykyk πevent_nbβ hold event notification callback. she's holding it. gently. π«Άstateβ define OTG enumeration states before device reset. the before-reset era, we remember πmodeβ thedr_modeof the controller. periodt. β
lowkey reminder bestie: this page is listing the fields exactly as they are β I'm not adding behaviour that isn't here, so don't come for me π
π SEE ALSO π
Kernel file ./drivers/phy/rockchip/phy-rockchip-inno-usb2.c, enum usb_chg_state(9), struct rockchip_chg_det_reg(9), struct rockchip_usb2phy_port_cfg(9), struct rockchip_usb2phy_cfg(9), struct rockchip_usb2phy(9)
like, go read those too, they're all in the same friend group π
and that's the whole page, bestie! πΈ this little beauty lives under ./drivers/phy/rockchip, dated October 2026, and you can find her again any time as struct rockc...usb2phy_port(9) β slay, bye! π
β¨π
π¦ 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