bq25792_set_chrg_volt(9)
β¨ 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:
- Kernel file
./drivers/power/supply/bq257xx_charger.c struct bq257xx_chip_info(9)struct bq257xx_chg(9)bq25792_read16(9)bq25792_write16(9)bq25703_get_state(9)bq25792_get_state(9)bq25703_get_min_vsys(9)bq25792_get_min_vsys(9)bq25703_set_min_vsys(9)bq25792_set_min_vsys(9)bq25703_get_cur(9)bq25792_get_cur(9)bq25703_get_ichg_cur(9)bq25792_get_ichg_cur(9)bq25703_set_ichg_cur(9)bq25792_set_ichg_cur(9)bq25703_get_chrg_volt(9)bq25792_get_chrg_volt(9)bq25703_set_chrg_volt(9)bq25703_get_iindpm(9)bq25792_get_iindpm(9)bq25703_set_iindpm(9)bq25792_set_iindpm(9)bq25703_get_vbat(9)bq25792_get_vbat(9)bq25703_hw_init(9)bq25792_hw_init(9)bq25703_hw_shutdown(9)bq25792_hw_shutdown(9)bq257xx_set_charger_property(9)bq257xx_get_charger_property(9)bq257xx_property_is_writeable(9)bq257xx_external_power_changed(9)bq257xx_irq_handler_thread(9)bq257xx_parse_dt(9)bq257xx_charger_probe(9)bq257xx_charger_shutdown(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms