i2c_acpi_ne...ce_by_fwnode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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, addr gets 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

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