usb_phy_get_charger_type(9)
π usb_phy_get_charger_type(9) π
okay bestie, welcome to the Kernel API Manual β this one's about grabbing the charger type from the extcon subsystem, and it's honestly lowkey iconic π
β¨ NAME β¨
usb_phy_get_charger_type β get charger type from extcon subsystem
πΈ SYNOPSIS πΈ
int usb_phy_get_charger_type (struct notifier_block *nb , unsigned long
state , void *data );
π¦ ARGUMENTS π¦
nbβ the notifier block, aka the thing that figures out the charger type for you π«Άstateβ the cable state, like what's plugged in rndataβ private data, the mysterious little sidekick π
β DESCRIPTION β
so basically you determine the charger type from the extcon subsystem π which also means the charger state has been changed (yes, like, actually changed, that's the whole vibe check), and then we should notify this event. that's it. that's the gig β¨
π₯ SEE ALSO π₯
- Kernel file
./drivers/usb/phy/phy.c usb_phy_notify_charger_work(9)usb_phy_set_charger_current(9)usb_phy_get_charger_current(9)usb_phy_set_charger_state(9)devm_usb_get_phy(9)usb_get_phy(9)devm_usb_get_phy_by_node(9)devm_usb_get_phy_by_phandle(9)usb_put_phy(9)usb_add_phy(9)usb_add_phy_dev(9)usb_remove_phy(9)usb_phy_set_event(9)
k bye bestie, go read the whole squad above π this page lives in ./drivers/usb/phy and it's dated October 2026, fr fr β signed, sealed, slayed ππ
π¦ 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