STRUCT MEI_CL_DEVICE(9)
π 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 parentmeidevice. 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 achar name[MEI_CL_NAME_SIZE], yes that'sMEI_CL_NAME_SIZEcharacters 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:1bitfield, 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. yourvoid *, your business, your secret little stash of whatever you need π
π SEE ALSO π
- Kernel file
./include/linux/mei_cl_bus.hπ§ module_mei_cl_driver(9)πΈ
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
- 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