STRUCT I2C_OF_PROBE_SIMPLE_OPTS(9)
π 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'sNULLif 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 tomsleep, so it's a real, actual nap π΄post_gpio_config_delay_msβ the delay after the GPIO is configured. also passed tomsleep. also a real nap πgpio_assert_to_enableβtrueif the GPIO should be asserted, i.e. set to logical high, to enable the component. so like,truemeans "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:
gpio_namegets configured to the non-active setting, according togpio_assert_to_enable.supply_nameregulator supply gets enabled. power's on, periodt π₯- Wait for
post_power_on_delay_msto pass. nap time π€ gpio_namegets configured to the active setting, according togpio_assert_to_enable.- Wait for
post_gpio_config_delay_msto 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/linuxtree, it's dated October 2026, and it's filed understruct 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
- 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