STRUCT WILCO_EC_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 child platform_device used by the debugfs sub-driver. baby device 🧚
  • rtc_pdev β€” the child platform_device used by the RTC sub-driver.
  • charger_pdev β€” child platform_device used by the charger config sub-driver. charging, but make it a sub-driver πŸ”‹
  • telem_pdev β€” the child platform_device used by the telemetry sub-driver. data about data, we stan πŸ“‘

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, i'm obsessed with this whole friend group 🌈


lowkey a reminder before you go: this page lives in ./include/linux/platform_data, and it's dated October 2026, and the title is struct 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