STRUCT I2C_OF_PROBE_SIMPLE_OPTS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct i2c_..._simple_opts(9) β€” Kernel API Manual, but make it make sense ✨

okay bestie, so this is a page out of the Kernel API Manual and it's literally the blueprint for how your simple I2C component prober callbacks get their vibe configured 🫢 like it's not scary, it's just a little struct of options, and we're gonna go through every single field together, no skips, no cap.


🌸 NAME 🌸

struct i2c_of_probe_simple_opts β€” the Options for simple I2C component prober callbacks. that's it, that's the whole name, she's self-explanatory and iconic πŸ’–


✨ SYNOPSIS ✨

struct i2c_of_probe_simple_opts {
    const char *res_node_compatible;
    const char *supply_name;
    const char *gpio_name;
    unsigned int post_power_on_delay_ms;
    unsigned int post_gpio_config_delay_ms;
    bool gpio_assert_to_enable;
 };

look at her. six fields. every one of them pulling its weight πŸ’…


πŸŽ€ Members πŸŽ€

so these are the fields, one by one, and yes we're doing all of them:

  • res_node_compatible β€” the compatible string of the device node you're pulling your resources from. iykyk 🌟
  • supply_name β€” the name of the regulator supply. that's her whole job πŸ“
  • gpio_name β€” the name of the GPIO. it's NULL if there's no GPIO line being used at all, and it's the empty string ("") if the GPIO line exists but is unnamed. two very different moods, don't mix them up πŸ’€
  • post_power_on_delay_ms β€” the delay after the regulators get powered on. this one gets passed to msleep, so it's a real, actual nap 😴
  • post_gpio_config_delay_ms β€” the delay after the GPIO is configured. also passed to msleep. also a real nap πŸŒ™
  • gpio_assert_to_enable β€” true if the GPIO should be asserted, i.e. set to logical high, to enable the component. so like, true means "assert it = turn it on" πŸ‘‘

πŸ¦‹ Description πŸ¦‹

okay so here's the actual tea: this struct describes the power sequences that are common across the whole class of components that the simple component prober supports. it's the group chat rules of power-up, and they go in this exact order:

  1. gpio_name gets configured to the non-active setting, according to gpio_assert_to_enable.
  2. supply_name regulator supply gets enabled. power's on, periodt πŸ”₯
  3. Wait for post_power_on_delay_ms to pass. nap time πŸ’€
  4. gpio_name gets configured to the active setting, according to gpio_assert_to_enable.
  5. Wait for post_gpio_config_delay_ms to pass. another nap 🌸

non-active first, power on, wait, then active, then wait again. that's the whole routine and it's honestly kind of elegant 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

go look at these, bestie, they're right there:

  • Kernel file ./include/linux/i2c-of-prober.h
  • struct i2c_of_probe_ops(9)
  • struct i2c_of_probe_cfg(9)
  • I2C OF component prober simple helpers(9)

ok final vibe check: this manual page lives in the ./include/linux tree, it's dated October 2026, and it's filed under struct i2c_..._simple_opts(9) β€” so if anyone asks where you got all this, you point them right there πŸ’– no gatekeeping, we share knowledge in this house 🫢✨
πŸ“¦ where this page comes from