diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-01-28 23:25:34 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-02-05 13:46:36 +0100 |
commit | cac28ac2a87c38a026d6d7601b06fe16f41ed751 (patch) | |
tree | 1a062633422ab529b304dcdbb6b46d06b8b4a1bf | |
parent | 9f21ef41a5c55c8d6f3c2f8a8773126f698f2a7d (diff) | |
download | lwn-cac28ac2a87c38a026d6d7601b06fe16f41ed751.tar.gz lwn-cac28ac2a87c38a026d6d7601b06fe16f41ed751.zip |
i2c: iop3xx: Add device tree probing
This adds device tree probing support for the IOP3xx
I2C master.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r-- | drivers/i2c/busses/i2c-iop3xx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 85cbe4b55578..a34cb3848280 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c @@ -471,6 +471,7 @@ iop3xx_i2c_probe(struct platform_device *pdev) new_adapter->owner = THIS_MODULE; new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; new_adapter->dev.parent = &pdev->dev; + new_adapter->dev.of_node = pdev->dev.of_node; new_adapter->nr = pdev->id; /* @@ -508,12 +509,19 @@ out: return ret; } +static const struct of_device_id i2c_iop3xx_match[] = { + { .compatible = "intel,iop3xx-i2c", }, + { .compatible = "intel,ixp4xx-i2c", }, + {}, +}; +MODULE_DEVICE_TABLE(of, i2c_iop3xx_match); static struct platform_driver iop3xx_i2c_driver = { .probe = iop3xx_i2c_probe, .remove = iop3xx_i2c_remove, .driver = { .name = "IOP3xx-I2C", + .of_match_table = i2c_iop3xx_match, }, }; |