STRUCT FBTFT_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

Okay so this is struct fbtft_ops(9) β€” the FBTFT operations structure β€” straight out of the Kernel API Manual, bestie πŸ’–. She's a struct full of function pointers and she is serving.


✨ SYNOPSIS ✨

Picture the struct, and it's giving a whole lineup of function pointers 🫢:

struct fbtft_ops {
    int (*write)(struct fbtft_par *par, void *buf, size_t len);
    int (*read)(struct fbtft_par *par, void *buf, size_t len);
    int (*write_vmem)(struct fbtft_par *par, size_t offset, size_t len);
    void (*write_register)(struct fbtft_par *par, int len, ...);
    void (*set_addr_win)(struct fbtft_par *par, int xs, int ys, int xe,
int ye);
    void (*reset)(struct fbtft_par *par);
    void (*mkdirty)(struct fb_info *info, int from, int to);
    void (*update_display)(struct fbtft_par *par, unsigned int
start_line, unsigned int end_line);
    int (*init_display)(struct fbtft_par *par);
    int (*blank)(struct fbtft_par *par, bool on);
    unsigned long (*request_gpios_match)(struct fbtft_par *par, const
struct fbtft_gpio *gpio);
    int (*request_gpios)(struct fbtft_par *par);
    int (*verify_gpios)(struct fbtft_par *par);
    void (*register_backlight)(struct fbtft_par *par);
    void (*unregister_backlight)(struct fbtft_par *par);
    int (*set_var)(struct fbtft_par *par);
    int (*set_gamma)(struct fbtft_par *par, u32 *curves);
};

πŸ’– MEMBERS πŸ’–

Here's the member-by-member vibe check, no skips, every single deet intact ✨:

  • write β€” writes to interface bus, periodt πŸ’…
  • read β€” reads from interface bus, no cap 🫢
  • write_vmem β€” writes video memory to display, slay ✨
  • set_addr_win β€” set the GRAM update window, iconic πŸŽ€
  • reset β€” reset the LCD controller, main character energy πŸ”₯
  • mkdirty β€” marks display lines for update, lowkey useful πŸ‘‘
  • update_display β€” updates the display, obviously πŸ’–
  • init_display β€” initializes the display, the actual beginning 🌸
  • blank β€” blank the display (optional), self-care mode 🧚
  • request_gpios_match β€” do pinname to gpio matching, iykyk πŸ¦‹
  • request_gpios β€” request gpios from the kernel, go ask nicely πŸ’œ
  • verify_gpios β€” verify that necessary gpios is present (optional), vibe check ⭐
  • register_backlight β€” used to register backlight device (optional), glow-up πŸ’‘
  • unregister_backlight β€” unregister backlight device (optional), bye bestie πŸ’€
  • set_var β€” configure LCD with values from variables like rotate and bgr (optional), very demure 🌈
  • set_gamma β€” set Gamma curve (optional), color me obsessed πŸ“
Also write_register is right up there in the synopsis β€” the Members list doesn't give it its own description, so I'm not making one up, bestie πŸ’€.

🌸 DESCRIPTION 🌸

Most of these operations have default functions assigned to them in fbtft_framebuffer_alloc β€” that's the whole plot twist, fr fr 🌈.


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/staging/fbtft/fbtft.h β€” struct fbtft_gpio(9), struct fbtft_display(9), struct fbtft_platform_data(9), struct fbtft_par(9)

Sign-off from ./drivers/staging/fbtft, dated October 2026 β€” this was struct fbtft_ops(9), and yes she ate πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from