ab8500_charg...ect_chargers(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, let me introduce you to ab8500_charger_detect_chargers β€” the little function that goes "hiii what's plugged into me rn" and detects the connected chargers βœ¨πŸ”Œ periodt.

This is a page from the Kernel API Manual, and yes we're doing kernel internals but make it cute πŸ’…


🌸 SYNOPSIS 🌸

int ab8500_charger_detect_chargers (struct ab8500_charger *di , bool
probe );

like literally that's the whole signature, no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • di β€” pointer to the ab8500_charger structure. it's giving "here's my whole personality in a struct" πŸ‘‘
  • probe β€” if probe, don't delay and wait for HW. so when this bad boy is set we skip the waiting-around era and go straight to the hardware, no chill mode 😀

πŸ¦‹ DESCRIPTION πŸ¦‹

Returns the type of charger connected. πŸ”₯

but bestie, listen β€” for USB it does not mean we can actually charge from it. it just means there's a USB cable connected that we still have to identify πŸ’€ like knowing someone's at the door but not knowing who they are yet.

This is used during startup when we don't get interrupts of the charger detection. so like, the doorbell's broken so we're just checking the porch manually, iykyk πŸ™ˆ

Returns an integer value, that means:

  • NO_PW_CONN β€” no power supply is connected 😭
  • AC_PW_CONN β€” if the AC power supply is connected ⚑
  • USB_PW_CONN β€” if the USB power supply is connected πŸ”Œ
  • AC_PW_CONN + USB_PW_CONN β€” if USB and AC power supplies are both connected πŸ‘‘βœ¨ (both? at the same time? main character energy fr fr)

🌈 SEE ALSO 🌈

the whole squad, assembled 🫢 first up, the kernel file itself:

Kernel file ./drivers/power/supply/ab8500_charger.c

then the friends:


bestie there are literally SO many handler functions and every single one of them made the list, we are not skipping a single one, that would be so rude πŸ’…

mwah, that's the page 🫢 this little number lives under ./drivers/power/supply and it's dated October 2026, which is giving "from the future" but make it kernel docs ⭐ go plug something in, bestie, and slay πŸ’–

πŸ“¦ where this page comes from