Skip to contentSkip to conversation

i2c: virtio: Update i2c-adapter's of_node

PATCH Applied Viresh Kumar 2 participants 2 messages Aug 18, 2021 – Aug 19, 2021

Subsystems (3)
lore
Share & tools
lore

Viresh Kumar

author maintainer
#0 lore raw

PATCH 1/1 i2c: virtio: Update i2c-adapter's of_node

Set of-node of the adapter to the virtio device's of-node to enable automatic parsing the of the I2C devices, if present in the DT.

---
 drivers/i2c/busses/i2c-virtio.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-virtio.c +1 -0
index d3e60d9cde10..2dde69cfb9aa 100644
@@ -228,6 +228,7 @@ static int virtio_i2c_probe(struct virtio_device *vdev)
 	vi->adap.algo = &virtio_algorithm;
 	vi->adap.quirks = &virtio_i2c_quirks;
 	vi->adap.dev.parent = &vdev->dev;
+	vi->adap.dev.of_node = vdev->dev.of_node;
 	i2c_set_adapdata(&vi->adap, vi);
 
 	/*
Signature · 1 line
2.31.1.272.g89b43f80a514
Applied
#1 lore raw
Quoted 4 lines · Viresh Kumar

Set of-node of the adapter to the virtio device's of-node to enable automatic parsing the of the I2C devices, if present in the DT.

Applied to for-next, thanks! Since I need to rebase for-mergewindow anyhow, I might just squash it into the main patch.