ENUM USB_CHG_STATE(9)
π enum usb_chg_state(9) π
okay bestie, welcome to the Kernel API Manual page for enum usb_chg_state(9). the vibe? different states involved in USB charger detection. no cap, itβs a whole little enum era β¨
πΈ NAME πΈ
enum usb_chg_state β Different states involved in USB charger detection.
β¨ SYNOPSIS β¨
enum usb_chg_state {
USB_CHG_STATE_UNDEFINED ,
USB_CHG_STATE_WAIT_FOR_DCD ,
USB_CHG_STATE_DCD_DONE ,
USB_CHG_STATE_PRIMARY_DONE ,
USB_CHG_STATE_SECONDARY_DONE ,
USB_CHG_STATE_DETECTED
};
sheβs giving βstate machine but make it cute,β and honestly? iconic π
π§ Constants π§
hereβs the squad, one by one:
USB_CHG_STATE_UNDEFINEDβ USB charger is not connected or detection process is not yet started. basically: no charger, or we havenβt even begun the detection process yet.USB_CHG_STATE_WAIT_FOR_DCDβ Waiting for Data pins contact. yes bestie, Data pins contact β thatβs the whole mood rn.USB_CHG_STATE_DCD_DONEβ Data pin contact is detected. slay, contact made πUSB_CHG_STATE_PRIMARY_DONEβ Primary detection is completed (Detects between SDP and DCP/CDP). iykyk β SDP vs DCP/CDP is the tea πUSB_CHG_STATE_SECONDARY_DONEβ Secondary detection is completed (Detects between DCP and CDP). another round of βwhich one is it?β energy, fr fr.USB_CHG_STATE_DETECTEDβ USB charger type is determined. periodt. the charger type has been figured out π
π¦ SEE ALSO π¦
okay so if you want the lore, check the Kernel file ./drivers/phy/rockchip/phy-rockchip-inno-usb2.c and these iconic structs:
struct rockchip_chg_det_reg(9)struct rockchip_usb2phy_port_cfg(9)struct rockchip_usb2phy_cfg(9)struct rockchip_usb2phy_port(9)struct rockchip_usb2phy(9)
thatβs the whole page, bestie π«Ά source/version: ./drivers/phy/rockchip Β· date: October 2026. mwah π
π¦ 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