summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2021-06-11 05:37:07 +0300
committerTom Rini <trini@konsulko.com>2021-07-06 21:12:15 +0300
commit103f233ebf1662c1302f28bd39b6bdac3035f79b (patch)
tree25141d72e561234dbbfeb712ececa26c78dcaf91 /drivers/i2c
parent3f70acdb7dc8c274a09e4421f78e25eac33fef76 (diff)
downloadu-boot-103f233ebf1662c1302f28bd39b6bdac3035f79b.tar.xz
lpc32xx: i2c: finish DM/OF code
Add the of_match/compatible string to the lpc32xx i2c driver so it works correctly with device-tree. Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/lpc32xx_i2c.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index 6abff263bd..774129ad8e 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -348,9 +348,15 @@ static const struct dm_i2c_ops lpc32xx_i2c_ops = {
.set_bus_speed = lpc32xx_i2c_set_bus_speed,
};
+static const struct udevice_id lpc32xx_i2c_ids[] = {
+ { .compatible = "nxp,pnx-i2c" },
+ { }
+};
+
U_BOOT_DRIVER(i2c_lpc32xx) = {
- .id = UCLASS_I2C,
.name = "i2c_lpc32xx",
+ .id = UCLASS_I2C,
+ .of_match = lpc32xx_i2c_ids,
.probe = lpc32xx_i2c_probe,
.ops = &lpc32xx_i2c_ops,
};