doc_probe_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… doc_probe_device(9) β€” like, the whole vibe check for a device ✨

okay so bestie, welcome to the Kernel API Manual entry for doc_probe_device πŸŽ€ this one lives in section 9 (that's the kernel-functions girlies) and honestly? it's giving "small function, big feelings" πŸ’–


🌸 NAME 🌸

doc_probe_device β€” check if a device is actually available, no cap πŸ•΅οΈβ€β™€οΈ


✨ SYNOPSIS ✨

struct mtd_info * doc_probe_device (struct docg3_cascade *cascade , int
floor , struct device *dev );

like literally that's the whole signature, she's not complicated πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cascade β€” the cascade of chips that this device (or these devices, plural energy 🫢) is gonna belong to
  • floor β€” the floor of the device we're probing, ikr, floors, in my kernel? more likely than you think 😭
  • dev β€” the device itself, the main character πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

So what does she do? She checks whether a device at the specified IO range β€” and at that floor β€” is available. Simple as that, periodt 🌈

Here's the return-value tea β˜•:

  • you get a mtd_info struct back if there is a device β€” slay πŸ’…
  • you get ENODEV if none was found β€” not me getting rejected 😭
  • you get ENOMEM if a memory allocation failed β€” tragic, but it happens πŸ™ˆ
⚠️ heads up bestie: if floor 0 is the one being checked, a reset of the ASIC gets launched. so like, know that before you poke it, fr fr πŸ”₯

πŸ”₯ SEE ALSO πŸ”₯

The kernel file to go read is ./drivers/mtd/devices/docg3.c β€” that's the mothership 🏠 and here's the whole friend group, no one gets left behind, iykyk:


and that's the whole page, bestie, you ate that πŸ“ this lil beauty ships out of ./drivers/mtd/devices, dated October 2026, and she answers to the name doc_probe_device(9) πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from