STRUCT FPGA_MANAGER_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct fpga_manager_ops(9) β€” NAME πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ this one's all about struct fpga_manager_ops β€” the ops for low level fpga manager drivers πŸŽ€


🌸 SYNOPSIS 🌸

like, here's the whole struct, literally character for character, no cap:

struct fpga_manager_ops {
    size_t initial_header_size;
    bool skip_header;
    enum fpga_mgr_states (*state)(struct fpga_manager *mgr);
    u64 (*status)(struct fpga_manager *mgr);
    int (*parse_header)(struct fpga_manager *mgr, struct fpga_image_info
*info, const char *buf, size_t count);
    int (*write_init)(struct fpga_manager *mgr, struct fpga_image_info
*info, const char *buf, size_t count);
    int (*write)(struct fpga_manager *mgr, const char *buf, size_t
count);
    int (*write_sg)(struct fpga_manager *mgr, struct sg_table *sgt);
    int (*write_complete)(struct fpga_manager *mgr, struct
fpga_image_info *info);
    void (*fpga_remove)(struct fpga_manager *mgr);
    const struct attribute_group **groups;
 };

✨ Members ✨

bestie, let's meet the whole squad, one member at a time 🫢

  • initial_header_size β€” the minimum number of bytes that should be passed into parse_header and write_init. like, don't skimp πŸ’…
  • skip_header β€” a bool flag that tells the fpga-mgr core whether it should skip the info->header_size part at the beginning of the image when it's invoking the write callback. iykyk πŸ¦‹
  • state β€” returns an enum value of the FPGA's state πŸ‘‘
  • status β€” returns status of the FPGA, including the reconfiguration error code 😭
  • parse_header β€” parses the FPGA image header to set info->header_size and info->data_size. and like, in case the input buffer is not large enough, set the required size to info->header_size and return -EAGAIN. she said try again later πŸ’€
  • write_init β€” prepare the FPGA to receive configuration data πŸŽ€
  • write β€” write count bytes of configuration data to the FPGA ✨
  • write_sg β€” write the scatter list of configuration data to the FPGA 🌈
  • write_complete β€” set the FPGA to operating state after writing is done, slay πŸ’…
  • fpga_remove β€” optional: Set FPGA into a specific state during driver remove πŸ™ˆ
  • groups β€” optional attribute groups. ✨

πŸ’œ Description πŸ’œ

so fpga_manager_ops are the low level functions implemented by a specific fpga manager driver. main character energy, honestly πŸ”₯

and the optional ones? they get tested for NULL before being called, so leaving them out is totally fine β€” no pressure, bestie, they're not gonna crash on you just for ghosting them 🧚


⭐ SEE ALSO ⭐

go read these next, fr fr:

  • Kernel file ./include/linux/fpga/fpga-mgr.h enum fpga_mgr_states(9)
  • FPGA Manager flags(9)
  • struct fpga_image_info(9)
  • struct fpga_compat_id(9)
  • struct fpga_manager_info(9)
  • struct fpga_manager(9)

k that's the whole page, bestie!! πŸ’– this was ./include/linux/fpga, October 2026, and the star of the show is struct fpga_manager_ops(9) β€” go forth and manage those fpgas, you absolute icon πŸ‘‘βœ¨

πŸ“¦ where this page comes from