Skip to content

Commit 07a27a0

Browse files
koaloWolfram Sang
authored andcommitted
i2c: bcm2835: Linking platform nodes to adapter nodes
In order to find I2C devices in the device tree, the platform nodes have to be known by the I2C core. This requires setting the dev.of_node parameter of the adapter. Signed-off-by: Florian Meier <florian.meier@koalo.de> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
1 parent 40b13ca commit 07a27a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/i2c/busses/i2c-bcm2835.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
299299
strlcpy(adap->name, "bcm2835 I2C adapter", sizeof(adap->name));
300300
adap->algo = &bcm2835_i2c_algo;
301301
adap->dev.parent = &pdev->dev;
302+
adap->dev.of_node = pdev->dev.of_node;
302303

303304
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0);
304305

0 commit comments

Comments
 (0)