[U-Boot] [PATCH 4/7] pci: i2c: designware: Add compatible string

Simon Glass sjg at chromium.org
Sat Nov 2 13:59:15 UTC 2019


Add a compatible string for this driver so that it can have children.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/i2c/dw_i2c_pci.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/i2c/dw_i2c_pci.c b/drivers/i2c/dw_i2c_pci.c
index 34cdc7bf59..193ad5225f 100644
--- a/drivers/i2c/dw_i2c_pci.c
+++ b/drivers/i2c/dw_i2c_pci.c
@@ -64,9 +64,15 @@ static int designware_i2c_pci_bind(struct udevice *dev)
 	return 0;
 }
 
+static const struct udevice_id designware_i2c_pci_ids[] = {
+	{ .compatible = "snps,designware-i2c-pci" },
+	{ }
+};
+
 U_BOOT_DRIVER(i2c_designware_pci) = {
 	.name	= "i2c_designware_pci",
 	.id	= UCLASS_I2C,
+	.of_match = designware_i2c_pci_ids,
 	.bind	= designware_i2c_pci_bind,
 	.probe	= designware_i2c_pci_probe,
 	.priv_auto_alloc_size = sizeof(struct dw_i2c),
-- 
2.24.0.rc1.363.gb1bccd3e3d-goog



More information about the U-Boot mailing list