usb_phy_get_charger_current(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ‘‘:


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