STRUCT ZD1301_DEMOD_PLATFORM_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct zd1301_demod_platform_data ✨

okay bestie, so this is a page from the Kernel API Manual (yes, that manual, the ✨iconic✨ one) and we're about to get into some platform data for the zd1301_demod driver. it's giving "small struct, big responsibilities" and honestly? i'm obsessed. let's go πŸ’…


🌸 NAME 🌸

struct zd1301_demod_platform_data β€” the platform data for the zd1301_demod driver, fr fr 🫢


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole vibe, character for character, do not touch:

struct zd1301_demod_platform_data {
    void *reg_priv;
    int (*reg_read)(void *, u16, u8 *);
    int (*reg_write)(void *, u16, u8);
 };

like, that's it. that's the whole struct. three little members carrying the entire register-access situation on their backs. main character energy, no cap πŸ‘‘


πŸ’– Members πŸ’–

  • reg_priv β€” this is the first argument that gets handed to your reg_read and reg_write callbacks. think of it as the lil' backpack of context that travels with every call. πŸŽ’
  • reg_read β€” the register read callback. you supply it, the driver calls it, register gets read. slay. πŸ”₯
  • reg_write β€” the register write callback. same deal but it writes. iconic behavior. ✨
ngl bestie, these three are a package deal β€” the two callbacks both take that reg_priv pointer as their first arg, so keep that in mind when you're wiring them up πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹


aaaand that's the whole thing! 🌈 this little beauty lives over in the kernel source at ./drivers/media/dvb-frontends, and this version of the page is dated October 2026. go forth and register-read/write responsibly, bestie πŸ’œπŸ§šπŸ‘‘

πŸ“¦ where this page comes from