bq25792_hw_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ bq25792_hw_init(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… this one's the bq25792_hw_init page and it's literally the glow-up routine for your BQ25792 charger chip. no cap. let's get into it 🫢


🌸 NAME 🌸

bq25792_hw_init β€” Initialize BQ25792 hardware


πŸŽ€ SYNOPSIS πŸŽ€

int bq25792_hw_init (struct bq257xx_chg *pdata );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pdata β€” the driver platform data. that's the whole vibe check right there, one (1) pointer and it's carrying all the platform info 🫑

πŸ’– DESCRIPTION πŸ’–

so what this function does is initialize the BQ25792, and it does it in a very specific order, okay, pay attention:

  • disabling the watchdog β€” bye bye watchdog πŸ‘‹
  • enabling discharge current sensing with a 5A limit β€” 5A, exactly 5A, don't @ me
  • configuring input current regulation β€” regulating that input current, iconic behavior

then it sets these from platform data, like it's ordering off a menu:

  • the charge current
  • charge voltage
  • minimum system voltage
  • input current limit

and finally it enables and configures the ADC to measure all available channels β€” every single channel, no skipping, main character ADC energy ✨


πŸ”₯ RETURN πŸ”₯

Returns 0 on success or an error code on error 😭 so like, check it. fr fr.


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/power/supply/bq257xx_charger.c, plus the whole friend group:


and that's the page bestie πŸ’– slay responsibly ✨

this came from ./drivers/power/supply, dated October 2026 β€” mwah, go read the source, ily πŸŽ€

πŸ“¦ where this page comes from