STRUCT FBTFT_PAR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct fbtft_par β€” the main FBTFT data structure, aka the main character of this whole show πŸŽ€

(this one lives in the Kernel API Manual, bestie β€” yes, that's the vibe of the manual we're in rn ✨)


🌸 SYNOPSIS 🌸

okay so here's the whole struct, every last field, no cap, not skipping a single one:

struct fbtft_par {
    struct spi_device *spi;
    struct platform_device *pdev;
    struct fb_info *info;
    struct fbtft_platform_data *pdata;
    u16 *ssbuf;
    u32 pseudo_palette[16];
    struct {
      void *buf;
      size_t len;
    } txbuf;
    u8 *buf;
    u8 startbyte;
    struct fbtft_ops fbtftops;
    spinlock_t dirty_lock;
    unsigned int dirty_lines_start;
    unsigned int dirty_lines_end;
    struct {
      struct gpio_desc *reset;
      struct gpio_desc *dc;
      struct gpio_desc *rd;
      struct gpio_desc *wr;
      struct gpio_desc *latch;
      struct gpio_desc *cs;
      struct gpio_desc *db[16];
      struct gpio_desc *led[16];
      struct gpio_desc *aux[16];
    } gpio;
    const s16 *init_sequence;
    struct {
      struct mutex lock;
      u32 *curves;
      int num_values;
      int num_curves;
    } gamma;
    unsigned long debug;
    bool first_update_done;
    ktime_t update_time;
    bool bgr;
    void *extra;
    bool polarity;
 };

πŸ¦‹ Members πŸ¦‹

a lil roll call of everyone invited to the function, iykyk πŸ‘‘

  • the pointers squad β€” spi, pdev, info, pdata, ssbuf, and pseudo_palette[16] πŸ’…
  • the txbuf duo β€” a nested struct holding buf and len (void *buf; and size_t len;) πŸŽ€
  • the solo crew β€” buf, startbyte, fbtftops, init_sequence, debug, first_update_done, update_time, bgr, extra, and polarity ✨
  • the dirty girls β€” dirty_lock (a spinlock_t), plus dirty_lines_start and dirty_lines_end (both unsigned int) πŸ”₯
  • the gpio block β€” reset, dc, rd, wr, latch, cs, and then the big arrays: db[16], led[16], aux[16] 🫢
  • the gamma block β€” lock (a struct mutex), curves (a u32 *), num_values, and num_curves 🌈

✨ Description ✨

This structure holds all relevant data to operate the display. literally all of it, it's giving "one struct to rule them all" πŸ‘‘

See sourcefile for documentation since nested structs is not supported by kernel-doc. yeah 😭 kernel-doc said "not me being unable to handle nested structs" so bestie, the sourcefile is where the real lore lives β€” go read it fr fr πŸ’€


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/staging/fbtft/fbtft.h struct fbtft_gpio(9), struct fbtft_ops(9), struct fbtft_display(9), struct fbtft_platform_data(9) β€” the whole friend group, go say hi 🌸


and that's the page bestie πŸŽ€ sign-off time: this lil gem comes from ./drivers/staging/fbtft, dated October 2026 ⭐ periodt πŸ’…

πŸ“¦ where this page comes from