i2c_acpi_ne...ce_by_fwnode(9)
π i2c_acpi_new_device_by_fwnode(9) π
okay bestie, so this is a page straight out of the Kernel API Manual β section 9, the kernel-guru section, iykyk β and it's literally about making a brand-new i2c-client for the *N*th I2cSerialBus resource. yes. that's the whole vibe. let's get into it β¨
πΈ NAME πΈ
i2c_acpi_new_device_by_fwnode β Create i2c-client for the Nth I2cSerialBus resource π
π¦ SYNOPSIS π¦
struct i2c_client * i2c_acpi_new_device_by_fwnode (struct fwnode_handle
*fwnode , int index , struct i2c_board_info *info );
π ARGUMENTS π
fwnodeβ the fwnode that's holding the ACPI resources you're grabbing the client from. this is the source of truth, bestie π«Άindexβ which ACPI resource you want. it's an index, so like. counting. you pick the number πinfoβ describes the I2C device. β οΈ heads up: this one gets modified β specifically,addrgets set. so don't be shocked when your struct comes back a little different, it's giving "character development"
β CONTEXT β
can sleep π΄ β yes bestie, this one is allowed to nap. plan accordingly.
π₯ DESCRIPTION π₯
okay so here's the lore. by default, the i2c subsys creates an i2c-client for the first I2cSerialBus resource of an acpi_device. cute, simple, one client. but β plot twist β some acpi_devices have multiple I2cSerialBus resources π and when that happens, that default just isn't enough.
that's literally where this function comes in. you use it to create an i2c-client for the other I2cSerialBus resources in the Current Resource Settings table. slay, honestly.
also see i2c_new_client_device, which this function calls to create the i2c-client β so like, it's the cooler older sibling that does the actual work π«‘
Returns a pointer to the new i2c-client, or an error pointer in case of failure. and specifically β mark this in your notes bestie β -EPROBE_DEFER is returned if the adapter is not found. that's the "not yet, try again later" of error codes and it's lowkey iconic π
π SEE ALSO π
Kernel file ./drivers/i2c/i2c-core-acpi.c
i2c_acpi_get_i2c_resource(9)i2c_acpi_client_count(9)i2c_acpi_get_irq(9)i2c_acpi_register_devices(9)i2c_acpi_find_bus_speed(9)
that's the whole friend group, go say hi π
and that's the page!! π sourced from ./drivers/i2c, dated October 2026, filed under the ever-mysterious i2c_acpi_ne...ce_by_fwnode(9) β the manpage title that got cut off mid-sentence and honestly? main character energy πβ¨ bye bestie, go build some clients π§π
π¦ 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