summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/imx258.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2021-01-27 18:46:33 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-06 09:36:10 +0100
commit9d14932d3eb0644684aa85b4f2dd5a90c455b2be (patch)
treeec541527780aece575f77df108163c042796f9f0 /drivers/media/i2c/imx258.c
parentd899e5f1db7aa67cad01f4835286cb985890a3da (diff)
downloadlwn-9d14932d3eb0644684aa85b4f2dd5a90c455b2be.tar.gz
lwn-9d14932d3eb0644684aa85b4f2dd5a90c455b2be.zip
media: i2c: imx258: add support for binding via device tree
The IMX258 can be used also on embedded designs using device tree so allow the sensor to bind to a device tree node. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c/imx258.c')
-rw-r--r--drivers/media/i2c/imx258.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c
index df62c69a48c0..ba7f29622974 100644
--- a/drivers/media/i2c/imx258.c
+++ b/drivers/media/i2c/imx258.c
@@ -1291,11 +1291,18 @@ static const struct acpi_device_id imx258_acpi_ids[] = {
MODULE_DEVICE_TABLE(acpi, imx258_acpi_ids);
#endif
+static const struct of_device_id imx258_dt_ids[] = {
+ { .compatible = "sony,imx258" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, imx258_dt_ids);
+
static struct i2c_driver imx258_i2c_driver = {
.driver = {
.name = "imx258",
.pm = &imx258_pm_ops,
.acpi_match_table = ACPI_PTR(imx258_acpi_ids),
+ .of_match_table = imx258_dt_ids,
},
.probe_new = imx258_probe,
.remove = imx258_remove,