diff options
author | Barry Song <Baohua.Song@csr.com> | 2012-12-26 02:30:16 (GMT) |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2013-01-22 08:54:31 (GMT) |
commit | bfd059da9503e0091541285cb0481f66b95c0296 (patch) | |
tree | 6a495b89b5c57467774421f4116a505c297da7e3 /drivers/i2c/busses | |
parent | 0f40cbc4f85e13b1a42ae2f41231645a14965872 (diff) | |
download | linux-bfd059da9503e0091541285cb0481f66b95c0296.tar.xz |
i2c: sirf: register i2c_client from dt child-nodes in probe entry
in probe() entry of i2c_driver, set the of node of adapter and
call of_i2c_register_devices to register all i2c_client from
dt child-nodes
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-sirf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c index 3f1818b..e03381a 100644 --- a/drivers/i2c/busses/i2c-sirf.c +++ b/drivers/i2c/busses/i2c-sirf.c @@ -12,6 +12,7 @@ #include <linux/slab.h> #include <linux/platform_device.h> #include <linux/i2c.h> +#include <linux/of_i2c.h> #include <linux/clk.h> #include <linux/err.h> #include <linux/io.h> @@ -328,6 +329,7 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev) adap->algo = &i2c_sirfsoc_algo; adap->algo_data = siic; + adap->dev.of_node = pdev->dev.of_node; adap->dev.parent = &pdev->dev; adap->nr = pdev->id; @@ -371,6 +373,8 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev) clk_disable(clk); + of_i2c_register_devices(adap); + dev_info(&pdev->dev, " I2C adapter ready to operate\n"); return 0; |