gaokun_ec_ps...smart_charge(9)
π gaokun_ec_ps...smart_charge(9) π
okay so this is a page from the Kernel API Manual, and honestly? she's a little function with a big job and i'm obsessed. welcome to the smart-charge corner of the gaokun EC world π¦
β¨ NAME β¨
gaokun_ec_psy_get_smart_charge β literally just Get smart charge data from EC. that's it. that's the whole vibe. it goes and asks the embedded controller for the smart charge numbers and brings them back for you π«Ά
πΈ SYNOPSIS πΈ
int gaokun_ec_psy_get_smart_charge (struct gaokun_ec *ec , u8
resp[GAOKUN_SMART_CHARGE_DATA_SIZE] );
yes bestie, that's the whole signature β no cap, nothing hidden. returns an int, takes your EC struct and a buffer. periodt π
π ARGUMENTS π
ecβ thegaokun_ecstructure. she's the main character here, the handle to everything EC-related, so you will be passing her along πrespβ the buffer where the response sequence gets stored: (mode, delay, start, end). that's the order, bestie, don't shuffle it π
β RETURN β
0 on success, or a negative error code if things go sideways. if you get a negative number, it's giving "not today" energy β go check what went wrong π
π¦ SEE ALSO π¦
the kernel file lives right here, and it's basically the group chat this function lives in:
./drivers/platform/arm64/huawei-gaokun-ec.c
and the whole friend group β all these manpages are linked up, iykyk:
gaokun_ec_read(9)gaokun_ec_write(9)gaokun_ec_register_notify(9)gaokun_ec_unregister_notify(9)gaokun_ec_psy_multi_read(9)gaokun_ec_psy_set_smart_charge(9)gaokun_ec_psy_get_smart_charge_enable(9)gaokun_ec_psy_set_smart_charge_enable(9)gaokun_ec_ucsi_read(9)gaokun_ec_ucsi_write(9)gaokun_ec_ucsi_get_reg(9)gaokun_ec_ucsi_pan_ack(9)
and that's the page, bestie π sign-off time: this one's from the ./drivers/platform/arm64 crew, stamped October 2026, and it's titled gaokun_ec_ps...smart_charge(9) in case you forgot where you were. slay ππ
π¦ 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