[PATCH v10 5/6] i2c: atr: Set adapter physical device

From: Herve Codina

Date: Wed Nov 18 2026 - 08:41:42 EST


For i2c atrs, the parent of the atr adapter device is the adapter device
the atr is connected to.

This parent is not necessarily the physical device related to the atr
adapter. An ATR can be used in a split serializer/deserializer topology
where atr->dev is the deserializer, but the ATR channel adapter is owned
by the serializer device passed as desc->parent.

Fill the adap.physdev with the desc->parent device.

Signed-off-by: Herve Codina <herve.codina@xxxxxxxxxxx>
---
drivers/i2c/i2c-atr.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/i2c-atr.c b/drivers/i2c/i2c-atr.c
index b98442ffff94..7c599d2d09c4 100644
--- a/drivers/i2c/i2c-atr.c
+++ b/drivers/i2c/i2c-atr.c
@@ -824,6 +824,7 @@ int i2c_atr_add_adapter(struct i2c_atr *atr, struct i2c_atr_adap_desc *desc)
chan->adap.algo = &atr->algo;
chan->adap.algo_data = chan;
chan->adap.dev.parent = desc->parent;
+ chan->adap.physdev = desc->parent;
chan->adap.retries = parent->retries;
chan->adap.timeout = parent->timeout;
chan->adap.quirks = parent->quirks;
--
2.56.0