gaokun_ec_p...harge_enable(9)
πΈ NAME
Ok so bestie, gather round β this is gaokun_ec_psy_set_smart_charge_enable, and its whole personality is: set the smart charge state. That's it, that's the vibe. π
We're in section 9 of the Kernel API Manual today, and yes, the page title is exactly gaokun_ec_p...harge_enable(9) β the truncation is giving main-character brevity and we respect it. π
β¨ SYNOPSIS
int gaokun_ec_psy_set_smart_charge_enable (struct gaokun_ec *ec , bool
on );
So you hand it a struct gaokun_ec * and a bool, and it returns an int. Boom. Signature served. π₯
π«Ά ARGUMENTS
ecβ Thegaokun_ecstructure. That's your whole EC situation right there, bestie, you gotta pass it in. β¨onβ The state. Like, the state. Turn-the-thing-on-or-off energy.bool. Iconic. π
π RETURN
Returns 0 on success, or a negative error code if it's not giving success. No cap β zero is the good number here, negative means something went sideways. π
π¦ SEE ALSO
The kernel file is right here, exactly as written:
Kernel file ./drivers/platform/arm64/huawei-gaokun-ec.c
And look at this whole friend group, all the related calls pulling up together β squad goals fr fr π:
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_get_smart_charge(9)gaokun_ec_psy_set_smart_charge(9)gaokun_ec_psy_get_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)
Notice how there's a get and a set for smart_charge_enable? Yeah β this page is the set one. The getter is right there chilling in the list. Iykyk π
Lowkey the whole page fits in your pocket: pass thegaokun_ecstruct, passtrueorfalse, get0or a negative error code back. Slay. π§
And that's the page! Sourced from ./drivers/platform/arm64, dated October 2026 β so it's a little time traveler from the future, and honestly? Obsessed. π Thanks for reading, bestie β go set some smart charge state, you absolute icon. π©·β
π¦ 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