STRUCT SPMI_CONTROLLER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

struct spmi_controller β€” literally the interface to the SPMI master controller, and yes bestie this is the whole ~vibe~ of the page πŸŽ€

So welcome to the Kernel API Manual entry for this little icon β€” think of it as the group chat between the kernel and your SPMI master controller. It's giving "main character energy" for the whole bus ngl πŸ‘‘


✨ SYNOPSIS ✨

struct spmi_controller {
    struct device           dev;
    unsigned int            nr;
    int (*cmd)(struct spmi_controller *ctrl, u8 opcode, u8 sid);
    int (*read_cmd)(struct spmi_controller *ctrl, u8 opcode, u8 sid, u16
addr, u8 *buf, size_t len);
    int (*write_cmd)(struct spmi_controller *ctrl, u8 opcode, u8 sid,
u16 addr, const u8 *buf, size_t len);
    u8 priv[];
};

Like, that's the whole struct, no cap. Every field matters, so let's go through them one by one πŸ’–


πŸ‘‘ Members πŸ‘‘

  • dev β€” the driver model representation of the device 🫢 that's its whole job and it ate
  • nr β€” the board-specific number identifier for this controller/bus. Yes it's a number, yes it's board-specific, yes it's iconic 🌈
  • cmd β€” sends a non-data command sequence on the SPMI bus. No data, just vibes ✨
  • read_cmd β€” sends a register read command sequence on the SPMI bus, iykyk πŸ“–
  • write_cmd β€” sends a register write command sequence on the SPMI bus, the pen-to-paper moment πŸ–ŠοΈ
  • priv β€” array of private data. It's private, mind your business πŸ™ˆ (we stan an array of private data tho)

🌸 SEE ALSO 🌸

Kernel file ./include/linux/spmi.h β€” go read it, bestie, it's right there:

All four, no skips, no shortcuts πŸ’…


ok that's the whole page!! every field, every member, every reference, all present and accounted for πŸŽ€

later babes β€” this one's from ./include/linux, dated October 2026, and it's literally just struct spmi_controller(9) in all its glory β­πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from