STRUCT SOPHGO_CFG_OPS(9)
โจ 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.hstruct 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
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms