Skip to content

Commit df9716e

Browse files
committed
regulator: pf8x00: Use specific compatible strings for devices
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>
1 parent 2819569 commit df9716e

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ description: |
1919
properties:
2020
compatible:
2121
enum:
22-
- nxp,pf8x00
22+
- nxp,pf8100
23+
- nxp,pf8121a
24+
- nxp,pf8200
2325

2426
reg:
2527
maxItems: 1
@@ -118,7 +120,7 @@ examples:
118120
#size-cells = <0>;
119121
120122
pmic@8 {
121-
compatible = "nxp,pf8x00";
123+
compatible = "nxp,pf8100";
122124
reg = <0x08>;
123125
124126
regulators {

drivers/regulator/pf8x00-regulator.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,13 +469,17 @@ static int pf8x00_i2c_probe(struct i2c_client *client)
469469
}
470470

471471
static const struct of_device_id pf8x00_dt_ids[] = {
472-
{ .compatible = "nxp,pf8x00",},
472+
{ .compatible = "nxp,pf8100",},
473+
{ .compatible = "nxp,pf8121a",},
474+
{ .compatible = "nxp,pf8200",},
473475
{ }
474476
};
475477
MODULE_DEVICE_TABLE(of, pf8x00_dt_ids);
476478

477479
static const struct i2c_device_id pf8x00_i2c_id[] = {
478-
{ "pf8x00", 0 },
480+
{ "pf8100", 0 },
481+
{ "pf8121a", 0 },
482+
{ "pf8200", 0 },
479483
{},
480484
};
481485
MODULE_DEVICE_TABLE(i2c, pf8x00_i2c_id);

0 commit comments

Comments
 (0)