diff mbox series

[v2,6/7] media: ov5693: add ov5693_of_match, dts support

Message ID 20220627150453.220292-7-tommaso.merciai@amarulasolutions.com (mailing list archive)
State New, archived
Headers show
Series media: ov5693: cleanup code and add dts support | expand

Commit Message

Tommaso Merciai June 27, 2022, 3:04 p.m. UTC
Add ov5693_of_match. Device tree support

Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 drivers/media/i2c/ov5693.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Jacopo Mondi June 29, 2022, 8:17 a.m. UTC | #1
Hi Tommaso,

On Mon, Jun 27, 2022 at 05:04:52PM +0200, Tommaso Merciai wrote:
> Add ov5693_of_match. Device tree support
>
> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Missing Signed-off-by

> ---
>  drivers/media/i2c/ov5693.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
> index 273caef467fe..0854226dc140 100644
> --- a/drivers/media/i2c/ov5693.c
> +++ b/drivers/media/i2c/ov5693.c
> @@ -1532,10 +1532,17 @@ static const struct acpi_device_id ov5693_acpi_match[] = {
>  };
>  MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match);
>
> +static const struct of_device_id ov5693_of_match[] = {
> +	{ .compatible = "ovti,ov5693", },
> +	{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, ov5693_of_match);
> +
>  static struct i2c_driver ov5693_driver = {
>  	.driver = {
>  		.name = "ov5693",
>  		.acpi_match_table = ov5693_acpi_match,
> +		.of_match_table = ov5693_of_match,
>  		.pm = &ov5693_pm_ops,
>  	},
>  	.probe_new = ov5693_probe,
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 273caef467fe..0854226dc140 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -1532,10 +1532,17 @@  static const struct acpi_device_id ov5693_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match);
 
+static const struct of_device_id ov5693_of_match[] = {
+	{ .compatible = "ovti,ov5693", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, ov5693_of_match);
+
 static struct i2c_driver ov5693_driver = {
 	.driver = {
 		.name = "ov5693",
 		.acpi_match_table = ov5693_acpi_match,
+		.of_match_table = ov5693_of_match,
 		.pm = &ov5693_pm_ops,
 	},
 	.probe_new = ov5693_probe,