gaokun_ec_ps...smart_charge(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gaokun_ec_psy_set_smart_charge ✨

okay bestie, so this one's from the Kernel API Manual β€” the page is literally called gaokun_ec_ps...smart_charge(9) (yes the name is truncated, we don't ask questions, we just vibe 🫢). It's the kernel-side hook that hands your smart-charge settings over to the EC. Let's get into it πŸ’–


🌸 NAME 🌸

gaokun_ec_psy_set_smart_charge β€” the function that sets the smart charge data. That's it, that's the whole job, and it ate πŸ’…


✨ SYNOPSIS ✨

int gaokun_ec_psy_set_smart_charge (struct gaokun_ec *ec , const u8
req[GAOKUN_SMART_CHARGE_DATA_SIZE] );

so you call it with your gaokun_ec struct, and you pass in a const u8 array sized GAOKUN_SMART_CHARGE_DATA_SIZE. It hands you back an int. iconic signature, no notes 🌟


πŸŽ€ ARGUMENTS πŸŽ€

  • ec β€” the gaokun_ec structure, your main character struct ✨
  • req β€” the sequence you're requesting, and it's giving a whole little bundle: (mode, delay, start, end) πŸ’–

πŸ”₯ RETURN πŸ”₯

0 on success, or a negative error code if it didn't slay 😭 so like, always check the return value, fr fr.


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./drivers/platform/arm64/huawei-gaokun-ec.c β€” that's the source of truth, go read it iykyk πŸ‘‘

and the whole friend group of sibling functions, all linked up:

like literally the entire gaokun_ec squad, go say hi to all of them πŸŒˆπŸ’œ


⚠️ quick vibe check: this is kernel API territory β€” you're writing into the EC, so treat that req buffer with the respect it deserves, bestie πŸ™ˆ

🌸 mwah, that's the whole page! brought to you by the ./drivers/platform/arm64 girlies, dated October 2026 β€” see you in the next manpage, periodt πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from