瀏覽代碼

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>
Florian Meier 11 年之前
父節點
當前提交
07a27a0047
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/i2c/busses/i2c-bcm2835.c

+ 1 - 0
drivers/i2c/busses/i2c-bcm2835.c

@@ -299,6 +299,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
 	strlcpy(adap->name, "bcm2835 I2C adapter", sizeof(adap->name));
 	adap->algo = &bcm2835_i2c_algo;
 	adap->dev.parent = &pdev->dev;
+	adap->dev.of_node = pdev->dev.of_node;
 
 	bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0);