bq25792_set_chrg_volt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ bq25792_set_chrg_volt(9) ✨

okay so bestie, we're in the Kernel API Manual today and this page is literally all about bq25792_set_chrg_volt β€” one little function, one big job. buckle up πŸŽ€


🌸 NAME 🌸

bq25792_set_chrg_volt β€” Set the maximum charge voltage

like, that's it. that's the whole vibe. it sets the max charge voltage. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int bq25792_set_chrg_volt (struct bq257xx_chg *pdata , int vbat );

no cap, that's the signature. don't @ me.


πŸ’– ARGUMENTS πŸ’–

  • pdata β€” the driver platform data. it's giving "the whole charger situation" energy. this is the struct you're passing in 🫢
  • vbat β€” the voltage value to set, in uV (microvolts, bestie, tiny tiny units ⚑). this is your requested charge voltage.

🌈 DESCRIPTION 🌈

ok so what actually happens: it sets the maximum charge voltage by clamping the value you asked for between the device limits, and then writes that to the appropriate register.

so like β€” if you ask for something unhinged, the device says "no babe, we're doing this in range" and clamps it. then it goes to the register. iconic behavior honestly πŸ‘‘


πŸ”₯ RETURN πŸ”₯

Returns 0 on success, or an error on failure to write. that's it. zero is the slay. anything else means the write did not go through 😭


🧚 SEE ALSO 🧚

the whole friend group 🫢 β€” and yes, we're listing every single one, because nobody gets left behind:


reminder bestie: vbat is in uV, not mV, not V. do not come in here with the wrong units, i'm begging πŸ™ˆ

and that's the page!! πŸ’œ this lil beauty lives in ./drivers/power/supply, dated October 2026 β€” go off, charger code, we love to see it β­πŸŽ€

πŸ“¦ where this page comes from