diff mbox

[15/28] i2c: eg20t: set i2c_adapter->dev.of_node

Message ID 1448900513-20856-16-git-send-email-paul.burton@imgtec.com
State Accepted
Headers show

Commit Message

Paul Burton Nov. 30, 2015, 4:21 p.m. UTC
Set the I2C adapter devices of_node to that of the PCI device, such that
I2C clients may be instantiated via device tree.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---

 drivers/i2c/busses/i2c-eg20t.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Wolfram Sang Dec. 3, 2015, 9:06 p.m. UTC | #1
On Mon, Nov 30, 2015 at 04:21:40PM +0000, Paul Burton wrote:
> Set the I2C adapter devices of_node to that of the PCI device, such that
> I2C clients may be instantiated via device tree.
> 
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>

Applied to for-next, thanks!
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index 76e699f..137125b 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -795,6 +795,7 @@  static int pch_i2c_probe(struct pci_dev *pdev,
 		/* base_addr + offset; */
 		adap_info->pch_data[i].pch_base_address = base_addr + 0x100 * i;
 
+		pch_adap->dev.of_node = pdev->dev.of_node;
 		pch_adap->dev.parent = &pdev->dev;
 
 		pch_i2c_init(&adap_info->pch_data[i]);