powerpc/fsl: Add generic compatible string for I2C EEPROM
authorJavier Martinez Canillas <javier@dowhile0.org>
Thu, 15 Jun 2017 18:54:15 +0000 (20:54 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Jun 2017 03:08:13 +0000 (13:08 +1000)
The at24 driver allows to register I2C EEPROM chips using different vendor
and devices, but the I2C subsystem does not take the vendor into account
when matching using the I2C table since it only has device entries.

But when matching using an OF table, both the vendor and device has to be
taken into account so the driver defines only a set of compatible strings
using the "atmel" vendor as a generic fallback for compatible I2C devices.

So add this generic fallback to the device node compatible string to make
the device to match the driver using the OF device ID table.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
12 files changed:
arch/powerpc/boot/dts/fsl/b4qds.dtsi
arch/powerpc/boot/dts/fsl/c293pcie.dts
arch/powerpc/boot/dts/fsl/p1010rdb.dtsi
arch/powerpc/boot/dts/fsl/p1023rdb.dts
arch/powerpc/boot/dts/fsl/p2041rdb.dts
arch/powerpc/boot/dts/fsl/p3041ds.dts
arch/powerpc/boot/dts/fsl/p4080ds.dts
arch/powerpc/boot/dts/fsl/p5020ds.dts
arch/powerpc/boot/dts/fsl/p5040ds.dts
arch/powerpc/boot/dts/fsl/t208xqds.dtsi
arch/powerpc/boot/dts/fsl/t4240qds.dts
arch/powerpc/boot/dts/fsl/t4240rdb.dts

index 3785ef8..999efd3 100644 (file)
                                        reg = <0>;
 
                                        eeprom@50 {
-                                               compatible = "at24,24c64";
+                                               compatible = "atmel,24c64";
                                                reg = <0x50>;
                                        };
                                        eeprom@51 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x51>;
                                        };
                                        eeprom@53 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x53>;
                                        };
                                        eeprom@57 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x57>;
                                        };
                                        rtc@68 {
index 6670978..5e905e0 100644 (file)
 &soc {
        i2c@3000 {
                eeprom@50 {
-                       compatible = "st,24c1024";
+                       compatible = "st,24c1024", "atmel,24c1024";
                        reg = <0x50>;
                };
 
index a8e4ba0..2ca9cee 100644 (file)
@@ -89,7 +89,7 @@
 &board_soc {
        i2c@3000 {
                eeprom@50 {
-                       compatible = "st,24c256";
+                       compatible = "st,24c256", "atmel,24c256";
                        reg = <0x50>;
                };
 
index 9716ca6..ead9283 100644 (file)
@@ -79,7 +79,7 @@
 
                i2c@3000 {
                        eeprom@53 {
-                               compatible = "at24,24c04";
+                               compatible = "atmel,24c04";
                                reg = <0x53>;
                        };
 
index e50fea9..950816b 100644 (file)
                                reg = <0x48>;
                        };
                        eeprom@50 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x50>;
                        };
                        rtc@68 {
 
                i2c@118100 {
                        eeprom@50 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x50>;
                        };
                };
index 40748e4..6f5f728 100644 (file)
 
                i2c@118100 {
                        eeprom@51 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x51>;
                        };
                        eeprom@52 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x52>;
                        };
                };
index 816b978..65e2015 100644 (file)
 
                i2c@118100 {
                        eeprom@51 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x51>;
                        };
                        eeprom@52 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x52>;
                        };
                        rtc@68 {
index cd6f373..b24adf9 100644 (file)
 
                i2c@118100 {
                        eeprom@51 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x51>;
                        };
                        eeprom@52 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x52>;
                        };
                };
index 4508473..30850b3 100644 (file)
 
                i2c@118100 {
                        eeprom@51 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x51>;
                        };
                        eeprom@52 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x52>;
                        };
                };
index ec080bd..db41399 100644 (file)
                                        reg = <0x0>;
 
                                        eeprom@50 {
-                                               compatible = "at24,24c512";
+                                               compatible = "atmel,24c512";
                                                reg = <0x50>;
                                        };
 
                                        eeprom@51 {
-                                               compatible = "at24,24c02";
+                                               compatible = "atmel,24c02";
                                                reg = <0x51>;
                                        };
 
                                        eeprom@57 {
-                                               compatible = "at24,24c02";
+                                               compatible = "atmel,24c02";
                                                reg = <0x57>;
                                        };
 
                                        reg = <0x1>;
 
                                        eeprom@55 {
-                                               compatible = "at24,24c02";
+                                               compatible = "atmel,24c02";
                                                reg = <0x55>;
                                        };
                                };
index 9573cea..c0913ac 100644 (file)
                                        reg = <0>;
 
                                        eeprom@51 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x51>;
                                        };
                                        eeprom@52 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x52>;
                                        };
                                        eeprom@53 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x53>;
                                        };
                                        eeprom@54 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x54>;
                                        };
                                        eeprom@55 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x55>;
                                        };
                                        eeprom@56 {
-                                               compatible = "at24,24c256";
+                                               compatible = "atmel,24c256";
                                                reg = <0x56>;
                                        };
                                        rtc@68 {
index 8166c66..15eb0a3 100644 (file)
                                reg = <0x2f>;
                        };
                        eeprom@52 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x52>;
                        };
                        eeprom@54 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x54>;
                        };
                        eeprom@56 {
-                               compatible = "at24,24c256";
+                               compatible = "atmel,24c256";
                                reg = <0x56>;
                        };
                        rtc@68 {