i2c: pca9541: add device tree binding
authorPeter Rosin <peda@axentia.se>
Sat, 9 Jul 2016 18:30:58 +0000 (20:30 +0200)
committerPeter Rosin <peda@axentia.se>
Thu, 25 Aug 2016 20:11:03 +0000 (22:11 +0200)
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>
drivers/i2c/muxes/i2c-mux-pca9541.c

index f052c30677910118d0de1e2ebdc924c457c291fb..4ea7e691afc75bb9d6aa7166cd02c9cde7cad9a7 100644 (file)
@@ -85,6 +85,13 @@ static const struct i2c_device_id pca9541_id[] = {
 
 MODULE_DEVICE_TABLE(i2c, pca9541_id);
 
+#ifdef CONFIG_OF
+static const struct of_device_id pca9541_of_match[] = {
+       { .compatible = "nxp,pca9541" },
+       {}
+};
+#endif
+
 /*
  * Write to chip register. Don't use i2c_transfer()/i2c_smbus_xfer()
  * as they will try to lock the adapter a second time.
@@ -383,6 +390,7 @@ static int pca9541_remove(struct i2c_client *client)
 static struct i2c_driver pca9541_driver = {
        .driver = {
                   .name = "pca9541",
+                  .of_match_table = of_match_ptr(pca9541_of_match),
                   },
        .probe = pca9541_probe,
        .remove = pca9541_remove,
This page took 0.024869 seconds and 5 git commands to generate.