STRUCT RMI_FUNCTION_HANDLER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct rmi_function_handler(9) ✨

okay so bestie, welcome to the struct rmi_function_handler glow-up πŸ’… this is a Kernel API Manual situation, and it's literally the driver routines for a particular RMI function β€” like, one function, one handler, main character energy only πŸ‘‘


🌸 NAME 🌸

struct rmi_function_handler β€” driver routines for a particular RMI function, periodt.


πŸŽ€ SYNOPSIS πŸŽ€

struct rmi_function_handler {
    struct device_driver driver;
    u8 func;
    int (*probe)(struct rmi_function *fn);
    void (*remove)(struct rmi_function *fn);
    int (*config)(struct rmi_function *fn);
    int (*reset)(struct rmi_function *fn);
    irqreturn_t (*attention)(int irq, void *ctx);
    int (*suspend)(struct rmi_function *fn);
    int (*resume)(struct rmi_function *fn);
 };

no cap, that's the whole struct, copy it exactly, don't get creative with it πŸ™ˆ


πŸ¦‹ Members πŸ¦‹

so here's the cast of callbacks, and honestly? every one of them ate:

  • func β€” the RMI function number. that's it, that's the whole vibe check πŸŽ€
  • config β€” gets called when the function container is first initialized, and again after a reset is detected. this routine should write any necessary configuration settings to the device. basically: set it up, then set it up again if the world ends πŸ’–
  • reset β€” called when a reset of the touch sensor is detected. this routine should perform any out-of-the-ordinary reset handling that might be necessary. and lowkey important: restoring of touch sensor configuration registers should be handled in the config callback, below. not here. iykyk 🫢
  • attention β€” called when the IRQ(s) for the function are set by the touch sensor. she's the one who answers the phone ☎️✨
  • suspend β€” should perform any required operations to suspend the particular function 😴
  • resume β€” should perform any required operations to resume the particular function 🌞
ngl bestie, probe and remove are right there in the struct too β€” they're part of the whole package even though this list doesn't give them their own lil paragraph πŸ™ˆ

⭐ Description ⭐

all callbacks are expected to return 0 on success, error code on failure. that's the rule, no exceptions, fr fr πŸ”₯


πŸ“ SEE ALSO πŸ“

go read those, they're iconic πŸ‘‘


and that's the page!! courtesy of ./drivers/input/rmi4, dated October 2026, and yes she's still signing off as struct rmi_function_handler(9) because consistency is a love language πŸ’œπŸŒ·

πŸ“¦ where this page comes from