STRUCT MEI_CL_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct mei_cl_device β€” the MEI device handle, explained by your fav kernel bestie ✨

okay so real talk: struct mei_cl_device is the MEI device handle, and it is literally the main character of every MEI bus client's life πŸŽ€

Here's the vibe: you get a struct mei_cl_device pointer handed back to you from mei_add_device(), and that pointer is the thing that links MEI bus clients to their actual ME host client pointer. <pink>Like a friendship bracelet between two structs, no cap.</pink> 🫢

So when a driver for an MEI device gets probed, it receives an mei_cl_device pointer β€” and it shall use that pointer for doing ME bus I/O. That's the whole assignment bestie, that's the job πŸ’…


✨ SYNOPSIS ✨

struct mei_cl_device {
    struct list_head bus_list;
    struct mei_device *bus;
    struct device dev;
    struct mei_me_client *me_cl;
    struct mei_cl *cl;
    char name[MEI_CL_NAME_SIZE];
    struct work_struct rx_work;
    mei_cldev_cb_t rx_cb;
    struct work_struct notif_work;
    mei_cldev_cb_t notif_cb;
    unsigned int do_match:1;
    unsigned int is_added:1;
    void *priv_data;
 };

πŸ¦‹ Members πŸ¦‹

the struct fields, one by one, let's go πŸ’–

  • bus_list β€” this device's spot on the bus list. it's on the list, it's living its truth ✨
  • bus β€” the parent mei device. think: the mom friend of this whole situation πŸ‘‘
  • dev β€” the linux driver model device pointer. the classic. the icon. πŸŽ€
  • me_cl β€” the me client 🌸
  • cl β€” the mei client πŸ’œ
  • name β€” the device name. yes it's a char name[MEI_CL_NAME_SIZE], yes that's MEI_CL_NAME_SIZE characters of pure identity 🌈
  • rx_work β€” async work to execute Rx event callback. it's giving "I'll get to it, but asynchronously" ⭐
  • rx_cb β€” drivers register this callback to get asynchronous ME Rx buffer pending notifications. register it, bestie, that's how you find out stuff is waiting for you 😭
  • notif_work β€” async work to execute FW notify event callback πŸ”₯
  • notif_cb β€” drivers register this callback to get asynchronous ME FW notification pending notifications. FW said something! and this is how you hear about it πŸ“£
  • do_match β€” whether the device can be matched with a driver. it's a :1 bitfield, so it's a little yes/no boo πŸ™ˆ
  • is_added β€” device is already scanned. she's been seen, she's been scanned, she's added πŸ’…
  • priv_data β€” client private data. your void *, your business, your secret little stash of whatever you need πŸ“

πŸ‘€ SEE ALSO πŸ‘€


that's the whole page bestie, go forth and I/O responsibly πŸ’–

sign-off szn πŸŽ€ this one lives in ./include/linux, dated October 2026, and it is filed under struct mei_cl_device(9) β€” mwah, periodt πŸ’‹

πŸ“¦ where this page comes from