i3c_i2c_driver_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ i3c_i2c_driver_register(9) β€” Kernel API Manual ✨

okay so bestie, we're in the Linux kernel API manual and this one is literally the "get both of your drivers registered at once" function. no cap. 🫢


🌸 NAME 🌸

i3c_i2c_driver_register β€” register an i2c and an i3c driver, together, like a little duo πŸ’…


✨ SYNOPSIS ✨

int i3c_i2c_driver_register (struct i3c_driver *i3cdrv , struct
       i2c_driver *i2cdrv );

two pointers, one function call, both drivers signed up. iconic behavior honestly.


πŸŽ€ ARGUMENTS πŸŽ€

  • i3cdrv β€” the I3C driver to register. this is the I3C side of the situation πŸ¦‹
  • i2cdrv β€” the I2C driver to register. and this is the I2C side 🌸

both of them, bestie. you don't get to pick just one.


🌈 DESCRIPTION 🌈

so what this does is it registers both i2cdev and i3cdev in one go β€” and (this is the important part, don't skip it πŸ‘€) it fails if one of these registrations fails. so if one of them goes off the rails, the whole call is like nope, we're not doing this πŸ’€

it's mainly useful for devices that support both I2C and I3C modes. you know, the dual-mode girlies. main character energy, both modes, one function πŸŽ€

also!! quick caveat, don't miss this: when CONFIG_I3C is not enabled, this function only registers the I2C driver. that's just how it is, fr fr 🧚

⭐ RETURN ⭐

0 if both registrations succeed β€” slay, we love a clean zero πŸ₯³

a negative error code otherwise. yeah. iconique of the error handling.


πŸ’– SEE ALSO πŸ’–

kicking off with the kernel file ./include/linux/i3c/device.h, and then the whole friend group:

go read them, iykyk πŸ“šπŸ¦‹


πŸ’‘ and if you register, you better also know about i3c_i2c_driver_unregister(9) β€” cleanup is self care, periodt 🌸

okay that's the whole page bestie, no notes πŸ’…

signing off from ./include/linux/i3c, dated October 2026 β€” that's the source and the date, and i3c_i2c_driver_register(9) is the whole vibe πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from