[media] media: i2c: ths8200: add OF support
authorLad, Prabhakar <prabhakar.csengg@gmail.com>
Sat, 22 Jun 2013 08:46:35 +0000 (05:46 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 26 Jul 2013 15:59:18 +0000 (12:59 -0300)
add OF support for the ths8200 driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Documentation/devicetree/bindings/media/i2c/ths8200.txt [new file with mode: 0644]
drivers/media/i2c/ths8200.c

diff --git a/Documentation/devicetree/bindings/media/i2c/ths8200.txt b/Documentation/devicetree/bindings/media/i2c/ths8200.txt
new file mode 100644 (file)
index 0000000..285f6ae
--- /dev/null
@@ -0,0 +1,19 @@
+* Texas Instruments THS8200 video encoder
+
+The ths8200 device is a digital to analog converter used in DVD players, video
+recorders, set-top boxes.
+
+Required Properties :
+- compatible : value must be "ti,ths8200"
+
+Example:
+
+       i2c0@1c22000 {
+               ...
+               ...
+               ths8200@5c {
+                       compatible = "ti,ths8200";
+                       reg = <0x5c>;
+               };
+               ...
+       };
index cc1339a9746378883e19efa5e447c6ed9997f64a..8a29810d155a1b50f13838ae14184ed131cf5562 100644 (file)
@@ -550,10 +550,19 @@ static struct i2c_device_id ths8200_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ths8200_id);
 
+#if IS_ENABLED(CONFIG_OF)
+static const struct of_device_id ths8200_of_match[] = {
+       { .compatible = "ti,ths8200", },
+       { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, ths8200_of_match);
+#endif
+
 static struct i2c_driver ths8200_driver = {
        .driver = {
                .owner = THIS_MODULE,
                .name = "ths8200",
+               .of_match_table = of_match_ptr(ths8200_of_match),
        },
        .probe = ths8200_probe,
        .remove = ths8200_remove,