]> www.infradead.org Git - linux.git/commitdiff
media: i2c: og01a1b: Add OF support to the image sensor driver
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Fri, 30 Aug 2024 06:34:55 +0000 (09:34 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 31 Aug 2024 07:40:43 +0000 (09:40 +0200)
The OmniVision  OG01A1B image sensor driver currently supports probing
only on ACPI platforms, the changes adds support of OF platforms to
the driver.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/og01a1b.c

index bac9597faf68f71085ae4c3a632df8bb331daf1e..9e756c1c47df8c3a993703ceb63c67ab4853a494 100644 (file)
@@ -1057,10 +1057,17 @@ static const struct acpi_device_id og01a1b_acpi_ids[] = {
 MODULE_DEVICE_TABLE(acpi, og01a1b_acpi_ids);
 #endif
 
+static const struct of_device_id og01a1b_of_match[] = {
+       { .compatible = "ovti,og01a1b" },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, og01a1b_of_match);
+
 static struct i2c_driver og01a1b_i2c_driver = {
        .driver = {
                .name = "og01a1b",
                .acpi_match_table = ACPI_PTR(og01a1b_acpi_ids),
+               .of_match_table = og01a1b_of_match,
        },
        .probe = og01a1b_probe,
        .remove = og01a1b_remove,