STRUCT WILCO_EC_MESSAGE(9)
β¨ struct wilco_ec_message β Request and response message β¨
okay bestie, so this is a page straight out of the Kernel API Manual, and it's about struct wilco_ec_message β literally the little envelope you use to slide a message over to the EC (embedded controller) and get one back. Think of it as your request-and-response situationship, formalized in C. π
πΈ SYNOPSIS πΈ
struct wilco_ec_message {
enum wilco_ec_msg_type type;
u8 flags;
size_t request_size;
void *request_data;
size_t response_size;
void *response_data;
};
π Members π
typeβ the mailbox message type. basically what kind of message you're sending, iykyk.flagsβ message flags, e.g.WILCO_EC_FLAG_NO_RESPONSE. little extra vibes attached to the message.request_sizeβ number of bytes to send to the EC. count 'em.request_dataβ buffer containing the request data. this is the payload you're shipping out π«Άresponse_sizeβ number of bytes to read from EC. how much you're expecting back.response_dataβ buffer containing the response data. it should beresponse_sizebytes and allocated by caller β so yes, that's on you, not on the kernel. no cap, do your own mallocing. π
heads up bestie: that last one is a classic gotcha.response_datamust be allocated by the caller and sized to exactlyresponse_sizebytes. don't be out here handing it an unallocated pointer, that's giving undefined chaos. π
π SEE ALSO π
- Kernel file
./include/linux/platform_data/wilco-ec.h struct wilco_ec_device(9)struct wilco_ec_request(9)struct wilco_ec_response(9)enum wilco_ec_msg_type(9)wilco_ec_mailbox(9)wilco_keyboard_leds_init(9)wilco_ec_get_property(9)wilco_ec_set_property(9)wilco_ec_get_byte_property(9)wilco_ec_add_sysfs(9)
and that's the whole page, bestie β iconic, no notes. this one's filed under ./include/linux/platform_data and stamped October 2026, so go forth and message your EC responsibly π¦πβ¨
π¦ 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