STRUCT WILCO_EC_DEVICE(9)
π struct wilco_ec_device(9) β the Wilco Embedded Controller handle, bestie edition π
okay so picture this: it's a struct wilco_ec_device, and it's literally the handle for the Wilco Embedded Controller. that's it, that's the whole vibe. this is the Kernel API Manual, and we're about to go through every single member together, no skipping, no cap π
β¨ SYNOPSIS β¨
here's the whole glow-up in one look π
struct wilco_ec_device {
struct device *dev;
struct mutex mailbox_lock;
struct resource *io_command;
struct resource *io_data;
struct resource *io_packet;
void *data_buffer;
size_t data_size;
struct platform_device *debugfs_pdev;
struct platform_device *rtc_pdev;
struct platform_device *charger_pdev;
struct platform_device *telem_pdev;
};
like... look at her. eleven members. main character energy fr fr π
πΈ Members πΈ
time for the roll call, everyone say hi π
devβ the device handle. your classic lil device friend π«Άmailbox_lockβ a mutex whose whole job is making sure there's only one mailbox command at a time. no cutting in line, no double-texting the EC, periodt πio_commandβ the I/O port for the mailbox command. and where does it come from? ACPI, obviously. Provided by ACPI β¨io_dataβ the I/O port for mailbox data. also Provided by ACPI.io_packetβ the I/O port for mailbox packet data. yep, Provided by ACPI too. ACPI really said "I got you" three times πdata_bufferβ the buffer used for EC communication. and here's the tea: the same buffer is used to hold the request AND the response. one buffer, two jobs, iconic efficiency πdata_sizeβ the size of that data buffer used for EC communication. the numbers, the facts, we love her πdebugfs_pdevβ the childplatform_deviceused by the debugfs sub-driver. baby device π§rtc_pdevβ the childplatform_deviceused by the RTC sub-driver.charger_pdevβ childplatform_deviceused by the charger config sub-driver. charging, but make it a sub-driver πtelem_pdevβ the childplatform_deviceused by the telemetry sub-driver. data about data, we stan π‘
π¦ SEE ALSO π¦
go read these next, i'm obsessed with this whole friend group π
- Kernel file
./include/linux/platform_data/wilco-ec.h struct wilco_ec_request(9)struct wilco_ec_response(9)enum wilco_ec_msg_type(9)struct wilco_ec_message(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)
lowkey a reminder before you go: this page lives in./include/linux/platform_data, and it's dated October 2026, and the title isstruct wilco_ec_device(9). that's the lore π
k bye bestie, go forth and talk to your embedded controller 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