media: dw9714: Add Devicetree support
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 15 Aug 2017 09:06:59 +0000 (05:06 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 26 Aug 2017 12:47:19 +0000 (08:47 -0400)
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/dw9714.c

index 6a607d7f82de3edcba1a5edb393775620ea5a5ea..bcf64ef8ad2958365c45ded08a285b24a3e28e21 100644 (file)
@@ -264,6 +264,12 @@ static const struct i2c_device_id dw9714_id_table[] = {
 
 MODULE_DEVICE_TABLE(i2c, dw9714_id_table);
 
+static const struct of_device_id dw9714_of_table[] = {
+       { .compatible = "dongwoon,dw9714" },
+       { { 0 } }
+};
+MODULE_DEVICE_TABLE(of, dw9714_of_table);
+
 static const struct dev_pm_ops dw9714_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(dw9714_vcm_suspend, dw9714_vcm_resume)
        SET_RUNTIME_PM_OPS(dw9714_vcm_suspend, dw9714_vcm_resume, NULL)
@@ -274,6 +280,7 @@ static struct i2c_driver dw9714_i2c_driver = {
                .name = DW9714_NAME,
                .pm = &dw9714_pm_ops,
                .acpi_match_table = ACPI_PTR(dw9714_acpi_match),
+               .of_match_table = dw9714_of_table,
        },
        .probe = dw9714_probe,
        .remove = dw9714_remove,