usb_phy_get_charger_current(9)
π usb_phy_get_charger_current π
okay so bestie, welcome to the Kernel API Manual β¨ this one's a little function with a big job, and yes it lives in the kernel, and yes it's gonna be cute about it. it's usb_phy_get_charger_current and it's here to spill the tea on charger currents π«Ά
πΈ NAME πΈ
usb_phy_get_charger_current β get the USB charger current πβ‘
β¨ SYNOPSIS β¨
void usb_phy_get_charger_current (struct usb_phy *usb_phy , unsigned int
*min , unsigned int *max );
like, it returns nothing (void, she's mysterious, she's not giving you a return value π
) and it takes three things. iconic signature ngl.
π ARGUMENTS π
usb_phyβ the USB phy to be used. this is your phy, the main character of the operation πminβ the minimum current. yep, minimum. the lowkey one πmaxβ the maximum current. the loud one π₯
π¦ DESCRIPTION π¦
so usually? we're out here notifying the maximum current to the power user. that's the normal vibe, that's the standard group chat message π±
but some special cases exist (iykyk π) where the power user also needs the minimum current value too. so in those moments, the power user can just call this function and get the suitable current. that's literally it, that's the whole gig β¨
no cap, this is the function's entire personality: hand over the min and the max currents when the power user asks nicely π
π§ SEE ALSO π§
kernel file: ./drivers/usb/phy/phy.c
and the whole friend group π:
usb_phy_notify_charger_work(9)usb_phy_get_charger_type(9)usb_phy_set_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)
and that's the page, bestie!! π this one's from ./drivers/usb/phy, dated October 2026, and honestly? slay. go get those currents, min and max, and remember: the phy is always the main character ππ¦β
π¦ 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