STRUCT PLATFORM_PROFILE_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct platform_profile_ops(9) πŸ’…

okay bestie, welcome to the Kernel API Manual entry for struct platform_profile_ops. no cap, this little struct is the operations table for platform profiles, and it's giving "small struct, big main character energy." ✨


🌸 NAME 🌸

struct platform_profile_ops β€” platform profile operations. that's the whole vibe, periodt. πŸŽ€


✨ SYNOPSIS ✨

struct platform_profile_ops {
    int (*probe)(void *drvdata, unsigned long *choices);
    int (*hidden_choices)(void *drvdata, unsigned long *choices);
    int (*profile_get)(struct device *dev, enum platform_profile_option
        *profile);
    int (*profile_set)(struct device *dev, enum platform_profile_option
        profile);
};

lowkey just a bundle of callbacks, but make it fashion. πŸ’…


🫢 Members 🫢

  • probe β€” callback to setup the choices available to the new class device. important caveat, bestie: these choices will only be enforced when setting a new profile, not when getting the current one. so don't expect them on the get side. πŸ™ˆ
  • hidden_choices β€” callback to setup choices that are not visible to the user but can be set by the driver. sneaky little choices, iykyk. πŸ’œ
  • profile_get β€” callback that will be called when showing the current platform profile in sysfs. literally the "show me what's happening" callback. 🌸
  • profile_set β€” callback that will be called when storing a new platform profile in sysfs. this is the "new profile, who dis" path. πŸ’…

🌈 SEE ALSO 🌈

  • Kernel file ./include/linux/platform_profile.h β€” go peek, bestie. it's right there. πŸ¦‹

mwah πŸ’œ β€” this page came from ./include/linux, dated October 2026, and it's filed under struct platform_profile_ops(9). slay. πŸŽ€

πŸ“¦ where this page comes from