[PATCH v3 15/28] i2c: core: Introduce i2c_get_adapter_physdev()

Andi Shyti andi.shyti at kernel.org
Tue Jul 22 07:04:31 PDT 2025


Hi Herve,

On Fri, Jun 13, 2025 at 03:47:55PM +0200, Herve Codina wrote:
> The physical device providing an I2C adapter is the device that calls
> i2c_add_adapter() or variants and i2c_del_adapter().
> 
> Most of the time this physical device is the parent of the adapter
> device.
> 
> Exceptions exist with i2c muxes. Indeed, in case of i2c muxes, the
> parent of the mux adapter device points to the adapter device the mux is
> connected to instead of the physical of this mux adapter.
> 
> Introduce i2c_get_adapter_physdev() and a new physdev field in the
> adapter structure in order to ease the adapter physical device
> retrieval.
> 
> Signed-off-by: Herve Codina <herve.codina at bootlin.com>

Makes sense to me,

Reviewed-by: Andi Shyti <andi.shyti at kernel.org>

Thanks,
Andi



More information about the linux-arm-kernel mailing list