STRUCT PINCONF_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hey bestie!! welcome to the struct pinconf_ops(9) page from the Kernel API Manual πŸ’–βœ¨ this one is literally the pin config operations struct, and it’s giving β€œdrivers with pin configuration superpowers, come implement me” energy. no cap.

🌸 NAME 🌸

struct pinconf_ops β€” the pin config operations hookup, to be implemented by pin configuration capable drivers. πŸ’…

✨ SYNOPSIS ✨

       struct pinconf_ops {
         #ifdef CONFIG_GENERIC_PINCONF;
           bool is_generic;
         #endif;
           int (*pin_config_get) (struct pinctrl_dev *pctldev, unsigned int
       pin, unsigned long *config);
           int (*pin_config_set) (struct pinctrl_dev *pctldev, unsigned int
       pin, unsigned long *configs, unsigned int num_configs);
           int (*pin_config_group_get) (struct pinctrl_dev *pctldev, unsigned
       int selector, unsigned long *config);
           int (*pin_config_group_set) (struct pinctrl_dev *pctldev, unsigned
       int selector, unsigned long *configs, unsigned int num_configs);
           void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev, struct
       seq_file *s, unsigned int offset);
           void (*pin_config_group_dbg_show) (struct pinctrl_dev *pctldev,
       struct seq_file *s, unsigned int selector);
           void (*pin_config_config_dbg_show) (struct pinctrl_dev *pctldev,
       struct seq_file *s, unsigned long config);
        };

πŸŽ€ Members πŸŽ€

okay so here’s the member-by-member vibe check, and yes every single one matters:

  • is_generic β€” for pin controllers that wanna use the generic interface, this flag tells the framework that it’s generic. 🫢
  • pin_config_get β€” get the config of a certain pin. if the requested config is not available on this controller, this should return -ENOTSUPP; and if it is available but disabled, it should return -EINVAL. periodt.
  • pin_config_set β€” configure an individual pin. slay.
  • pin_config_group_get β€” get configurations for an entire pin group; should return -ENOTSUPP and -EINVAL using the same rules as pin_config_get. iykyk.
  • pin_config_group_set β€” configure all pins in a group. πŸ’œ
  • pin_config_dbg_show β€” optional debugfs display hook that will provide per-device info for a certain pin in debugfs. no cap.
  • pin_config_group_dbg_show β€” optional debugfs display hook that will provide per-device info for a certain group in debugfs. πŸ¦‹
  • pin_config_config_dbg_show β€” optional debugfs display hook that will decode and display a driver’s pin configuration parameter. iconic.

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/linux/pinctrl/pinconf.h β€” go read it bestie, it’s right there. πŸ“šβœ¨


cute sign-off time: source is ./include/linux/pinctrl, date is October 2026, and the page is struct pinconf_ops(9). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from