i3c_i2c_driver_register(9)
π 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:
enum i3c_error_code(9)enum i3c_xfer_mode(9)struct i3c_xfer(9)enum i3c_dcr(9)struct i3c_device_info(9)struct i3c_driver(9)dev_to_i3cdev(9)module_i3c_driver(9)i3c_i2c_driver_unregister(9)module_i3c_i2c_driver(9)struct i3c_ibi_setup(9)
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
- 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