bq25703_set_chrg_volt(9)
π bq25703_set_chrg_volt(9) β like, the Kernel API Manual page, bestie β¨
okay so real talk, this is a page straight out of the Kernel API Manual and honestly? it's lowkey iconic. it's all about bq25703_set_chrg_volt, one little function that has one job and does it slayfully. let's get into it π
πΈ NAME πΈ
bq25703_set_chrg_volt β sets the maximum charge voltage. that's it, that's the whole vibe. no cap. π
β¨ SYNOPSIS β¨
int bq25703_set_chrg_volt (struct bq257xx_chg *pdata , int vbat );
like, it takes two things and returns an int. simple. elegant. main character energy fr fr π
π«Ά ARGUMENTS π«Ά
pdataβ the driver platform data. it's giving "the whole charger's info card", she carries everything the driver needs to know about herself πββοΈvbatβ the voltage value you wanna set, measured in uV. yep, microvolts. tiny units, big responsibility β‘
π DESCRIPTION π
okay so here's the tea π΅ β this function takes the maximum charge voltage you're requesting, and then it clamps it. meaning if your number is too low, it gets bumped up to the minimum value the charger actually supports (she has standards, okay?), and if your number is too high, it gets capped at a user defined maximum charging value (protective queen behavior, we love to see it π‘οΈ).
and then, once your value has been politely corrected into the valid range, she writes it to the appropriate register. periodt. π
π₯ RETURN π₯
returns 0 on success β or an error if an error occurs π like yes bestie, errors do be happening sometimes.
π SEE ALSO π
the whole friend group, gather round π«Ά this is the full squad, and yes, every single one of them matters:
- the 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)bq25792_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)
iykyk πβ¨
ok that's the whole page bestie, go forth and set those charge voltages responsibly π
and a lil sign-off for the credits moment π β this one lives in ./drivers/power/supply, and it's dated October 2026. iconic behavior, honestly. ππ¦
π¦ 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