STRUCT SOPHGO_CFG_OPS(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ struct sophgo_cfg_ops(9) โœจ

okay so bestie, we're in the Kernel API Manual today, and the star of the show is struct sophgo_cfg_ops โ€” literally the pin configuration operations table. it's giving "the hookup board for pinctrl" energy and honestly? iconic. ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

struct sophgo_cfg_ops โ€” pin configuration operations. that's it, that's the whole vibe. ๐Ÿ’…


โœจ SYNOPSIS โœจ

struct sophgo_cfg_ops {
    int (*pctrl_init)(struct platform_device *pdev, struct sophgo_pinctrl *pctrl);
    int (*verify_pinmux_config)(const struct sophgo_pin_mux_config *config);
    int (*verify_pin_group)(const struct sophgo_pin_mux_config *pinmuxs, unsigned int npins);
    int (*dt_node_to_map_post)(struct device_node *cur, struct sophgo_pinctrl *pctrl, struct sophgo_pin_mux_config *pinmuxs, unsigned int npins);
    int (*compute_pinconf_config)(struct sophgo_pinctrl *pctrl, const struct sophgo_pin *sp, unsigned long *configs, unsigned int num_configs, u32 *value, u32 *mask);
    int (*set_pinconf_config)(struct sophgo_pinctrl *pctrl, const struct sophgo_pin *sp, u32 value, u32 mask);
    void (*set_pinmux_config)(struct sophgo_pinctrl *pctrl, const struct sophgo_pin *sp, u32 config);
 };

like, look at her. seven function pointers, all slaying in their own lane. ๐Ÿฆ‹


๐Ÿซถ Members ๐Ÿซถ

okay let's meet the cast, one by one, no skips, we're doing all seven:

  • pctrl_init โ€” the soc specific init callback. every good story starts with an init, periodt. ๐ŸŒฑ
  • verify_pinmux_config โ€” verifies the pinmux config for a pin. just one little pin getting its vibe check. ๐Ÿ”
  • verify_pin_group โ€” verifies the whole pinmux group. now the entire friend group is under review, ngl. ๐Ÿ‘ฏ
  • dt_node_to_map_post โ€” post init for the pinmux config map. the afterparty of the device tree mapping, lowkey essential. ๐ŸŽ‰
  • compute_pinconf_config โ€” computes the pinconf config. math but make it pads. ๐Ÿงฎ
  • set_pinconf_config โ€” sets the pinconf config, and heads up bestie: the caller holds lock. so like, don't just walk in and start touching things, the lock is held. ๐Ÿ’€
  • set_pinmux_config โ€” sets the mux config, and again, for the people in the back: the caller holds lock. same rule, no cap. ๐Ÿ”’

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • Kernel file ./drivers/pinctrl/sophgo/pinctrl-sophgo.h
  • struct sophgo_vddio_cfg_ops(9) โ€” her sibling, go say hi ๐Ÿซถ

fr fr bestie, go read the header file before you go poking at these pointers. the lock thing is not a drill. ๐Ÿ’€โœจ

and that's the page!! ๐ŸŽ€ this whole thing lives over in ./drivers/pinctrl/sophgo, dated October 2026, and it's for struct sophgo_cfg_ops(9) โ€” mwah, go forth and configure pins responsibly, ily ๐Ÿ’–๐Ÿ”ฅ

๐Ÿ“ฆ where this page comes from