STRUCT RMI_DRIVER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct rmi_driver(9)

okay so this is from the Kernel API Manual β€” section 9, kernel API territory β€” and it's all about struct rmi_driver, which is, and I quote the vibe, the driver for an RMI4 sensor on the RMI bus. bestie. an entire driver struct. let's get into it ✨


🌸 NAME 🌸

struct rmi_driver β€” literally the driver for an RMI4 sensor on the RMI bus. that's the whole name section, no notes, iconic πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the shape of it, character for character, don't @ me:

struct rmi_driver {
    struct device_driver driver;
    int (*reset_handler)(struct rmi_device *rmi_dev);
    int (*clear_irq_bits)(struct rmi_device *rmi_dev, unsigned long
*mask);
    int (*set_irq_bits)(struct rmi_device *rmi_dev, unsigned long
*mask);
    int (*store_productid)(struct rmi_device *rmi_dev);
    int (*set_input_params)(struct rmi_device *rmi_dev, struct input_dev
*input);
    void *data;
 };

like, look at all those function pointers. main character energy honestly πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so the manpage doesn't give us a big prose paragraph here β€” rude, but okay β€” it goes straight into the members. this struct is what a driver for an RMI4 sensor on the RMI bus is made of, and every field is listed below. some of them are function pointers that the kernel will call back into, and one is just a void * for your own stuff. classic. 🫢


✨ MEMBERS ✨

  • driver β€” the device driver model driver. yes that's the field name and part of the type name, we love a recursive-sounding moment πŸ’€
  • reset_handler β€” the callback that gets called when a reset is detected. it takes struct rmi_device *rmi_dev and returns an int. πŸ”₯
  • clear_irq_bits β€” clears the specified bits in the current interrupt mask. signature is int (*clear_irq_bits)(struct rmi_device *rmi_dev, unsigned long *mask) β€” note the mask is a pointer to unsigned long. πŸ’…
  • store_productid β€” callback for cache product id from function 01. takes struct rmi_device *rmi_dev, returns int. 🌟
  • data β€” private data pointer. that's it. that's the field. void *data; and it's yours to do whatever with πŸŽ€
heads up bestie: the SYNOPSIS also shows set_irq_bits and set_input_params sitting right there in the struct, but this page doesn't spell out a description for those two. don't come for me, i'm just reporting what's on the page πŸ™ˆ

🧚 SEE ALSO 🧚

the kernel file ./include/linux/rmi.h and honestly a whole friend group of structs β€” go read them all, no skipping:

  • struct rmi_2d_axis_alignment(9)
  • struct rmi_gpio_data(9)
  • struct rmi_f01_power_management(9)
  • struct rmi_device_platform_data_spi(9)
  • struct rmi_device_platform_data(9)
  • struct rmi_function_descriptor(9)
  • struct rmi_transport_dev(9)
  • struct rmi_transport_ops(9)
  • struct rmi_device(9)

k that's the whole page, you ate it, go write a driver 🌈

and finally the cute sign-off: this little beauty lives over in ./include/linux, dated October 2026, and it's filed under struct rmi_driver(9) β€” periodt πŸ’œπŸ“

πŸ“¦ where this page comes from