gaokun_ec_psy_multi_read(9)
π
gaokun_ec_psy_multi_read β like, the whole vibe β¨
okay so bestie, welcome to the Kernel API Manual and today's main character is gaokun_ec_psy_multi_read(9) β a function so specific and so useful it basically has its own fan club π«Ά. It reads a whole contiguous stretch of registers in one go instead of making you do it one at a time like some kind of peasant. no cap, it's giving efficiency.
β¨ NAME β¨
gaokun_ec_psy_multi_read β read contiguous registers π
Like. Contiguous. Registers. Plural. She does multiple at once. Obsessed.
π SYNOPSIS π
int gaokun_ec_psy_multi_read (struct gaokun_ec *ec , u8 reg , size_t
resp_len , u8 *resp );
That's the whole summoning ritual, copy it exactly, don't @ me π.
πΈ ARGUMENTS πΈ
ecβ thegaokun_ecstructure π¦. Yes, the whole struct. She needs context, she needs lore, she needs hergaokun_ec.regβ the start register β. This is where the reading begins, bestie β the starting point of the little register road trip.resp_lenβ the number of registers to be read π₯. Tell her how many, and she'll go get exactly that many.respβ the buffer to store response sequence π§. The lil container where all the register data gets to live afterwards. Cozy.
π RETURN π
0 on success or negative error code π.
That's it. Zero means slay, negative means something went sideways β and it's a negative error code, so check it, fr fr. Don't be out here ignoring return values, that's not the vibe check you want to fail π.
π SEE ALSO π
- Kernel file
./drivers/platform/arm64/huawei-gaokun-ec.cβ the source of truth, go read her π gaokun_ec_read(9)gaokun_ec_write(9)gaokun_ec_register_notify(9)gaokun_ec_unregister_notify(9)gaokun_ec_psy_get_smart_charge(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)
A whole friend group honestly, they all ate π .
ok that's the whole page, no notes. now go read your registers responsibly, bestie π
sign-off time πβ¨ β this one lives in ./drivers/platform/arm64, it's dated October 2026, and it's officially gaokun_ec_psy_multi_read(9), mwah π periodt.
π¦ 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