STRUCT ROCKCHIP_CHG_DET_REG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct rockchip_chg_det_reg(9) πŸ’–

okay so bestie, this one's straight out of the Kernel API Manual β€” like, the manual name is literally struct rockchip_chg_det_reg(9) β€” and it's giving "the USB charger detect registers" and nothing else. No cap, it's a struct, it holds registers, and it's here to detect chargers. Let's get into it 🫢


🌸 NAME 🌸

struct rockchip_chg_det_reg β€” usb charger detect registers. That's the whole vibe. It's the little bundle of registers that figures out what kind of USB thing you just plugged in πŸ”Œβœ¨


✨ SYNOPSIS ✨

struct rockchip_chg_det_reg {
    struct usb2phy_reg      cp_det;
    struct usb2phy_reg      dcp_det;
    struct usb2phy_reg      dp_det;
    struct usb2phy_reg      idm_sink_en;
    struct usb2phy_reg      idp_sink_en;
    struct usb2phy_reg      idp_src_en;
    struct usb2phy_reg      rdm_pdwn_en;
    struct usb2phy_reg      vdm_src_en;
    struct usb2phy_reg      vdp_src_en;
    struct usb2phy_reg      opmode;
};

Like, ten fields, all of them struct usb2phy_reg, all of them doing their little job. Obsessed with how tidy that is πŸ’…


πŸŽ€ Members πŸŽ€

  • cp_det β€” charging port detected successfully. It ate and left no crumbs βœ…
  • dcp_det β€” dedicated charging port detected successfully. The dedicated one showed up and it's main character energy πŸ‘‘
  • dp_det β€” assert data pin connect successfully. The data pin is connected, periodt.
  • idm_sink_en β€” open dm sink curren. (yes, "curren" β€” that's literally what it says in here, and honestly? iconic 😭)
  • idp_sink_en β€” open dp sink current.
  • idm_sink_en's sibling behavior: it opens the dp sink current, not the dm one β€” read the field names carefully bestie, iykyk πŸ™ˆ
  • idp_src_en β€” open dm source current.
  • rdm_pdwn_en β€” open dm pull down resistor. Pull it down, slay 🌈
  • vdm_src_en β€” open dm voltage source. Voltage, but make it dm ⚑
  • vdp_src_en β€” open dp voltage source. Same energy, dp flavored πŸ’œ
  • opmode β€” utmi operational mode. This one's the mode switch, the big boss, the vibe check for the whole UTMI situation 🧚
Ngl bestie, the field names are cute but you gotta read them like your life depends on it β€” idm_sink_en is dm, idp_sink_en is dp, idp_src_en says dm, and rdm_pdwn_en / vdm_src_en / vdp_src_en are all doing their own little dm/dp moment. Copy them exactly, don't "fix" them πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/phy/rockchip/phy-rockchip-inno-usb2.c enum usb_chg_state(9), struct rockchip_usb2phy_port_cfg(9), struct rockchip_usb2phy_cfg(9), struct rockchip_usb2phy_port(9), struct rockchip_usb2phy(9)

Go read those next, bestie, they're all in the same friend group fr fr 🌸


and that's the page!! πŸŽ€ written under ./drivers/phy/rockchip, dated October 2026, and signed off as struct rockchip_chg_det_reg(9) β€” periodt, no cap, see u in the next manpage πŸ’–πŸ”₯

πŸ“¦ where this page comes from