i2c_of_probe_simple_enable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ i2c_of_probe_simple_enable ✨

okay so bestie, this is a page from the Kernel API Manual and it's about i2c_of_probe_simple_enable β€” literally the simple helper that lets the I2C OF prober get and enable its resources πŸ’… it's giving "little function, big job" and honestly? obsessed.


πŸŽ€ SYNOPSIS πŸŽ€

int i2c_of_probe_simple_enable (struct device *dev , struct device_node
*bus_node , void *data );

three args, returns an int, no cap 🫢


🌸 ARGUMENTS 🌸

  • dev β€” a pointer to the struct device of whoever's calling. lowkey it's only there for dev_printk messages, so it's the group-chat narrator and nothing else πŸ’¬
  • bus_node β€” a pointer to the struct device_node of the I2C adapter. that's the vibe check on which adapter we're talking about 🌈
  • data β€” a pointer to the struct i2c_of_probe_simple_ctx helper context. the main character carrying all the info ✨

πŸ’– DESCRIPTION πŸ’–

so here's the tea, fr fr:

  • if i2c_of_probe_simple_opts->supply_name is given, it requests the regulator supply with that name πŸ”Œ
  • if i2c_of_probe_simple_opts->gpio_name is given, it requests the GPIO with that name. or, if it's the empty string, it requests the unnamed GPIO 🧚
  • if a regulator supply was actually found, it enables that regulator ⚑
  • if a GPIO line was found, it configures the GPIO line to output and sets the value according to the given options πŸŽ€

it's literally "find the thing, then turn the thing on" energy and she ate πŸ”₯


⭐ RETURN ⭐

0 on success or no-op (yes bestie, doing nothing counts as a win sometimes 😌), or a negative error number on failure πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie 🌸 it lives in ./drivers/i2c, dated October 2026, and that's the Kernel API Manual signing off πŸ’œ mwah 🫢

πŸ“¦ where this page comes from