diff options
author | Peter Rosin <peda@axentia.se> | 2016-07-09 14:30:58 -0400 |
---|---|---|
committer | Peter Rosin <peda@axentia.se> | 2016-08-25 16:11:03 -0400 |
commit | a1cbf338abaf4d340b7aee1d8255e20462d11e70 (patch) | |
tree | 465c36ae4ffd8b52bab494be7e62a54704d19e32 | |
parent | 40839590f868d77ab8f84ac6e1b1297f553e3dea (diff) |
i2c: pca9541: add device tree binding
No longer rely on the implicit matching with the i2c device name, use
an explicit compatible string instead.
Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Peter Rosin <peda@axentia.se>
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-pca9541.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/i2c-mux-pca9541.c index f052c3067791..4ea7e691afc7 100644 --- a/drivers/i2c/muxes/i2c-mux-pca9541.c +++ b/drivers/i2c/muxes/i2c-mux-pca9541.c | |||
@@ -85,6 +85,13 @@ static const struct i2c_device_id pca9541_id[] = { | |||
85 | 85 | ||
86 | MODULE_DEVICE_TABLE(i2c, pca9541_id); | 86 | MODULE_DEVICE_TABLE(i2c, pca9541_id); |
87 | 87 | ||
88 | #ifdef CONFIG_OF | ||
89 | static const struct of_device_id pca9541_of_match[] = { | ||
90 | { .compatible = "nxp,pca9541" }, | ||
91 | {} | ||
92 | }; | ||
93 | #endif | ||
94 | |||
88 | /* | 95 | /* |
89 | * Write to chip register. Don't use i2c_transfer()/i2c_smbus_xfer() | 96 | * Write to chip register. Don't use i2c_transfer()/i2c_smbus_xfer() |
90 | * as they will try to lock the adapter a second time. | 97 | * as they will try to lock the adapter a second time. |
@@ -383,6 +390,7 @@ static int pca9541_remove(struct i2c_client *client) | |||
383 | static struct i2c_driver pca9541_driver = { | 390 | static struct i2c_driver pca9541_driver = { |
384 | .driver = { | 391 | .driver = { |
385 | .name = "pca9541", | 392 | .name = "pca9541", |
393 | .of_match_table = of_match_ptr(pca9541_of_match), | ||
386 | }, | 394 | }, |
387 | .probe = pca9541_probe, | 395 | .probe = pca9541_probe, |
388 | .remove = pca9541_remove, | 396 | .remove = pca9541_remove, |