platform_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the Kernel API Manual page for platform_match(9) β€” literally here to bind platform device to platform driver. πŸ’…βœ¨


✨ SYNOPSIS ✨

int platform_match (struct device *dev , const struct device_driver *drv
       );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device. that's the device bestie 🫢
  • drv β€” the driver. and this one is the driver πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, no cap: platform device IDs are assumed to be encoded like this:

"<name><instance>"

where <name> is a short description of the type of device, like "pci" or "floppy", and <instance> is the enumerated instance of the device, like '0' or '42'. Driver IDs are simply "<name>". 🌈

so yeah β€” extract the <name> from the platform_device structure, and compare it against the name of the driver. Then return whether they match or not. that's the whole vibe check, periodt ✨πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

okay the whole squad is here, and yes we're listing every single one because we don't skip anyone in this group chat πŸ’…


mwah πŸ’‹ this iconic little page comes from source/version ./drivers/base, dated October 2026, and it's platform_match(9) β€” bye bestie, slay your kernel adventures πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from