regulator: pf8x00: Use specific compatible strings for devices
authorMark Brown <broonie@kernel.org>
Tue, 15 Dec 2020 13:20:24 +0000 (13:20 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 16 Dec 2020 13:53:55 +0000 (13:53 +0000)
The pf8x00 driver supports three devices, the DT compatible strings
and I2C IDs should enumerate these specifically rather than using a
wildcard so that we don't collide with anything incompatible in the
same ID range in the future and so that we can handle any software
visible differences between the variants we find.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20201215132024.13356-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
drivers/regulator/pf8x00-regulator.c

index a6c259ce97850c6dc196b40d38f6a81dfa63bf9a..956156fe52a3eb6040a44d8a4d393cf25b857484 100644 (file)
@@ -19,7 +19,9 @@ description: |
 properties:
   compatible:
     enum:
-      - nxp,pf8x00
+      - nxp,pf8100
+      - nxp,pf8121a
+      - nxp,pf8200
 
   reg:
     maxItems: 1
@@ -118,7 +120,7 @@ examples:
         #size-cells = <0>;
 
         pmic@8 {
-            compatible = "nxp,pf8x00";
+            compatible = "nxp,pf8100";
             reg = <0x08>;
 
             regulators {
index 308c27fa6ea80b85e82aba082f898cd910ee2e1b..af9918cd27aa435ef52a2c424811a830eec59795 100644 (file)
@@ -469,13 +469,17 @@ static int pf8x00_i2c_probe(struct i2c_client *client)
 }
 
 static const struct of_device_id pf8x00_dt_ids[] = {
-       { .compatible = "nxp,pf8x00",},
+       { .compatible = "nxp,pf8100",},
+       { .compatible = "nxp,pf8121a",},
+       { .compatible = "nxp,pf8200",},
        { }
 };
 MODULE_DEVICE_TABLE(of, pf8x00_dt_ids);
 
 static const struct i2c_device_id pf8x00_i2c_id[] = {
-       { "pf8x00", 0 },
+       { "pf8100", 0 },
+       { "pf8121a", 0 },
+       { "pf8200", 0 },
        {},
 };
 MODULE_DEVICE_TABLE(i2c, pf8x00_i2c_id);