[v4,6/6] media: ov5693: add ov5693_of_match, dts support
Commit Message
Add ov5693_of_match. Device tree support
Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
---
Changes since v2:
- Change patch order 7 -> 6 as suggested by Sakari
- Add missing signed-off as suggested by Jacopo
Changes since v3:
- Add reviewed-by tags, suggested by Jacopo, Krzysztof
drivers/media/i2c/ov5693.c | 7 +++++++
1 file changed, 7 insertions(+)
Comments
Hello
On 30/06/2022 08:45, Tommaso Merciai wrote:
> Add ov5693_of_match. Device tree support
>
> Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Reviewed-by: Daniel Scally <djrscally@gmail.com>
> ---
> Changes since v2:
> - Change patch order 7 -> 6 as suggested by Sakari
> - Add missing signed-off as suggested by Jacopo
>
> Changes since v3:
> - Add reviewed-by tags, suggested by Jacopo, Krzysztof
>
> 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 3c805a5a5181..5930207193c7 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,
@@ -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,