ab8500_charger_set_current(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ab8500_charger_set_current(9) β€” like, the charger-current setter, bestie

okay so this one lives in the Kernel API Manual, and it's literally called ab8500_charger_set_current β€” yes, it does what it says on the tin πŸŽ€


✨ NAME ✨

ab8500_charger_set_current β€” set charger current, periodt πŸ’…


🌸 SYNOPSIS 🌸

int ab8500_charger_set_current (struct ab8500_charger *di , int ich_ua ,
int reg );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • di β€” pointer to the ab8500_charger structure 🫢 like, the handle to the whole charger vibe
  • ich_ua β€” charger current, in uA ⚑ the actual number we're setting
  • reg β€” select what charger register to set 🎯 pick your fighter

πŸ‘‘ DESCRIPTION πŸ‘‘

So we're setting the charger current. Iconic. But here's the tea 😭 β€” there is no state machine in the AB to step the charger current up/down, and the whole reason for that is to avoid dips and spikes on MAIN, VBUS and VBAT when charging is started. So instead, we need to implement this charger current step-up/down right here in this function. Not me doing the AB's homework for it πŸ’€

Returns an error code in case of failure, else 0 (on success) ✨ slay.

ngl bestie, the stepping is the whole point here β€” the AB isn't gonna do it for you, so don't skip it πŸ™ˆ

🧚 SEE ALSO 🧚

Like, the entire extended universe of this driver, fr fr πŸ’– Starting with the Kernel file ./drivers/power/supply/ab8500_charger.c:


and that's the whole page, bestie 🌈 it ships from ./drivers/power/supply, dated October 2026, and it's still out here being ab8500_charger_set_current(9) πŸ’œ mwah 🫢

πŸ“¦ where this page comes from