STRUCT RMI_DRIVER(9)
π 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 takesstruct rmi_device *rmi_devand returns anint. π₯clear_irq_bitsβ clears the specified bits in the current interrupt mask. signature isint (*clear_irq_bits)(struct rmi_device *rmi_dev, unsigned long *mask)β note themaskis a pointer tounsigned long. πstore_productidβ callback for cache product id from function 01. takesstruct rmi_device *rmi_dev, returnsint. π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 showsset_irq_bitsandset_input_paramssitting 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms