bq25703_get_cur(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– bq25703_get_cur(9) β€” Kernel API Manual πŸ’–

okay so bestie, we're in the Kernel API Manual today and the star of the show is bq25703_get_cur(9) β€” yes it's a mouthful, yes it ate, let's get into it ✨


🌸 NAME 🌸

bq25703_get_cur β€” get the reported current from the battery πŸͺ«

πŸŽ€ SYNOPSIS πŸŽ€

int bq25703_get_cur (struct bq257xx_chg *pdata , int *intval );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pdata β€” the driver platform data. your main character struct 🫢
  • intval β€” the value of the reported battery current, aka where the number lands πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

So what does it do? It reads the reported current from the battery. That's it, that's the vibe. πŸ”₯

But here's the little plot twist πŸ‘€ β€” the value it reads is always positive. So if the battery is discharging, the sign gets set to negative. Not me flipping signs for accuracy 😭 iconic behaviour fr fr.

⭐ RETURN ⭐

It returns 0 on success. If it can't read the value, you get an error back instead β€” no fake success here, we don't do that πŸ’€

🌈 SEE ALSO 🌈

These are the besties in the same friend group, no cap β€” and they live in 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), 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), 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)

🧚 and that's the whole page, bestie β€” go read your battery current responsibly πŸ’–

this little drop came straight out of ./drivers/power/supply, dated October 2026 β€” slay, periodt πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from