diff mbox series

[4/4] media: i2c: ov02c10: Add OF probe support

Message ID 20250315134009.157132-5-bryan.odonoghue@linaro.org (mailing list archive)
State New
Headers show
Series ov02c10: OF extensions and fixups | expand

Commit Message

Bryan O'Donoghue March 15, 2025, 1:40 p.m. UTC
Supply OF probe matching table and enumeration structure hook.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/media/i2c/ov02c10.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Hans de Goede March 15, 2025, 9:06 p.m. UTC | #1
Hi,

On 15-Mar-25 2:40 PM, Bryan O'Donoghue wrote:
> Supply OF probe matching table and enumeration structure hook.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Thanks this looks very straight forward, I'll squash this
into v10.

Regards,

Hans



> ---
>  drivers/media/i2c/ov02c10.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c
> index d3dc614a3c01..094651228763 100644
> --- a/drivers/media/i2c/ov02c10.c
> +++ b/drivers/media/i2c/ov02c10.c
> @@ -1004,11 +1004,18 @@ static const struct acpi_device_id ov02c10_acpi_ids[] = {
>  MODULE_DEVICE_TABLE(acpi, ov02c10_acpi_ids);
>  #endif
>  
> +static const struct of_device_id ov02c10_of_match[] = {
> +	{ .compatible = "ovti,ov02c10" },
> +	{ /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, ov02c10_of_match);
> +
>  static struct i2c_driver ov02c10_i2c_driver = {
>  	.driver = {
>  		.name = "ov02c10",
>  		.pm = pm_sleep_ptr(&ov02c10_pm_ops),
>  		.acpi_match_table = ACPI_PTR(ov02c10_acpi_ids),
> +		.of_match_table = ov02c10_of_match,
>  	},
>  	.probe = ov02c10_probe,
>  	.remove = ov02c10_remove,
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c
index d3dc614a3c01..094651228763 100644
--- a/drivers/media/i2c/ov02c10.c
+++ b/drivers/media/i2c/ov02c10.c
@@ -1004,11 +1004,18 @@  static const struct acpi_device_id ov02c10_acpi_ids[] = {
 MODULE_DEVICE_TABLE(acpi, ov02c10_acpi_ids);
 #endif
 
+static const struct of_device_id ov02c10_of_match[] = {
+	{ .compatible = "ovti,ov02c10" },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, ov02c10_of_match);
+
 static struct i2c_driver ov02c10_i2c_driver = {
 	.driver = {
 		.name = "ov02c10",
 		.pm = pm_sleep_ptr(&ov02c10_pm_ops),
 		.acpi_match_table = ACPI_PTR(ov02c10_acpi_ids),
+		.of_match_table = ov02c10_of_match,
 	},
 	.probe = ov02c10_probe,
 	.remove = ov02c10_remove,