STRUCT INTEL_TH_DRIVER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct intel_th_driver β€” the manual page, but make it make sense

okay so bestie, this is struct intel_th_driver(9) straight out of the Kernel API Manual, section 9, and it's genuinely the blueprint for "driver for an intel_th_device device". Think of it as the personality sheet a driver fills out so the intel_th core knows how to talk to it. Obsessed. Let's go πŸŽ€


✨ SYNOPSIS ✨

here's the whole struct, character for character, no edits from me fr fr:

struct intel_th_driver {
    struct device_driver    driver;
    int (*probe)(struct intel_th_device *thdev);
    void (*remove)(struct intel_th_device *thdev);
    int (*assign)(struct intel_th_device *thdev, struct intel_th_device *othdev);
    void (*unassign)(struct intel_th_device *thdev, struct intel_th_device *othdev);
    void (*prepare)(struct intel_th_device *thdev, struct intel_th_output *output);
    void (*enable)(struct intel_th_device *thdev, struct intel_th_output *output);
    void (*trig_switch)(struct intel_th_device *thdev, struct intel_th_output *output);
    void (*disable)(struct intel_th_device *thdev, struct intel_th_output *output);
    irqreturn_t (*irq)(struct intel_th_device *thdev);
    void (*wait_empty)(struct intel_th_device *thdev);
    int (*activate)(struct intel_th_device *thdev);
    void (*deactivate)(struct intel_th_device *thdev);
    const struct file_operations *fops;
    const struct attribute_group *attr_group;
    int (*set_output)(struct intel_th_device *thdev, unsigned int master);
 };

🌸 MEMBERS 🌸

okay so every single member, with the exact vibes the page gives it β€” including the ones the page literally doesn't describe (not me inventing lore πŸ™ˆ):

  • driver β€” the generic driver. that's it, that's the whole description πŸ’€
  • probe β€” probe method ✨
  • remove β€” remove method ✨
  • assign β€” match a given output type device against available outputs
  • unassign β€” deassociate an output type device from an output port
  • prepare β€” prepare output port for tracing
  • enable β€” enable tracing for a given output device
  • disable β€” disable tracing for a given output device
  • irq β€” interrupt callback
  • activate β€” enable tracing on the output's side
  • deactivate β€” disable tracing on the output's side
  • fops β€” file operations for device nodes
  • attr_group β€” attributes provided by the driver
  • trig_switch β€” bestie, the page gives this one no description at all, so I'm not gonna make one up 🀷
  • wait_empty β€” same situation, no description on the page 🌸
  • set_output β€” also undescribed on this page, taking struct intel_th_device *thdev and unsigned int master. no cap, that's all we get 🫢
real talk: trig_switch, wait_empty and set_output are in the struct but the Members section doesn't spell them out. I'm telling you exactly as much as the page tells you, nothing more πŸ’œ

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, here's the actual rules of the game:

Callbacks probe and remove are required for all device types. literally all of them, no skipping πŸ‘‘

A switch device driver needs to fill in the assign, enable and disable callbacks. those three, specifically. main character requirements only πŸ’…


🌈 SEE ALSO 🌈

go read these next, iykyk:


and that's the page!! πŸŽ€ this one lives down in ./drivers/hwtracing/intel_th, dated October 2026 β€” so like, future-core of it. slay, go write a driver bestie πŸ’–πŸ¦‹β­

πŸ“¦ where this page comes from