mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-06 22:55:11 +00:00
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>
This commit is contained in:
parent
9f21ef41a5
commit
cac28ac2a8
1 changed files with 8 additions and 0 deletions
|
@ -471,6 +471,7 @@ iop3xx_i2c_probe(struct platform_device *pdev)
|
||||||
new_adapter->owner = THIS_MODULE;
|
new_adapter->owner = THIS_MODULE;
|
||||||
new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
|
new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
|
||||||
new_adapter->dev.parent = &pdev->dev;
|
new_adapter->dev.parent = &pdev->dev;
|
||||||
|
new_adapter->dev.of_node = pdev->dev.of_node;
|
||||||
new_adapter->nr = pdev->id;
|
new_adapter->nr = pdev->id;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -508,12 +509,19 @@ out:
|
||||||
return ret;
|
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 = {
|
static struct platform_driver iop3xx_i2c_driver = {
|
||||||
.probe = iop3xx_i2c_probe,
|
.probe = iop3xx_i2c_probe,
|
||||||
.remove = iop3xx_i2c_remove,
|
.remove = iop3xx_i2c_remove,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "IOP3xx-I2C",
|
.name = "IOP3xx-I2C",
|
||||||
|
.of_match_table = i2c_iop3xx_match,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue