]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lpc32xx: i2c: finish DM/OF code
authorTrevor Woerner <twoerner@gmail.com>
Fri, 11 Jun 2021 02:37:07 +0000 (22:37 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 6 Jul 2021 18:12:15 +0000 (14:12 -0400)
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>
drivers/i2c/lpc32xx_i2c.c

index 6abff263bdcc7f5f1cd54cdaedc6324ff92fd389..774129ad8ea5f4eab3d026e58abe13d500e86bd5 100644 (file)
@@ -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,
 };