i2c_acpi_get_i2c_resource(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i2c_acpi_get_i2c_resource β€” so you wanna grab an I2cSerialBus resource? bestie, same

okay so real quick β€” this is a page from the Kernel API Manual (section 9, the kernel-API girlies know πŸ‘‘), and it's all about i2c_acpi_get_i2c_resource, aka "gets I2cSerialBus resource if type matches". that's the whole NAME situation, no notes πŸ’–


✨ SYNOPSIS ✨

bool i2c_acpi_get_i2c_resource (struct acpi_resource *ares , struct
       acpi_resource_i2c_serialbus **i2c );

not me obsessing over a function that returns a bool β€” she's giving "yes or no, no maybes" energy and honestly? iconic πŸŽ€


🌸 ARGUMENTS 🌸

  • ares β€” the ACPI resource. that's the thing you're handing over for inspection, bestie πŸ¦‹
  • i2c β€” a pointer to the I2cSerialBus resource, and this is where that pointer gets returned to you. like, you bring the bucket, the function fills the bucket πŸͺ£βœ¨

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe check πŸ”₯ this function checks if the given ACPI resource (ares) is of type I2cSerialBus. and if it is? slay. it returns a pointer to it right back to the caller.

and the return value, since you're gonna ask: it returns true if the resource type is of I2cSerialBus, otherwise false. simple as that, no cap πŸ’―

ngl this is the "are you the one or not" of kernel functions and she answers immediately πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel source file lives at ./drivers/i2c/i2c-core-acpi.c β€” yes, that's the one, go read her πŸ“–βœ¨

like, the whole friend group fr fr 🫢


and that's the page, bestie πŸ’… she lives in ./drivers/i2c, dated October 2026, and this little group-chat study session was brought to you by the Kernel API Manual β€” mwah, periodt πŸŒˆβ­πŸ’–

πŸ“¦ where this page comes from