mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
media: i2c: ov5670: Allow probing with OF
The ov5670 driver currently only supports probing using ACPI matching. Add support for OF and add a missing header inclusion. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Luca Weiss <luca@z3ntu.xyz> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
3e4ab2342f
commit
5635500ae5
1 changed files with 9 additions and 0 deletions
|
@ -3,7 +3,9 @@
|
|||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-device.h>
|
||||
|
@ -2583,11 +2585,18 @@ static const struct acpi_device_id ov5670_acpi_ids[] = {
|
|||
MODULE_DEVICE_TABLE(acpi, ov5670_acpi_ids);
|
||||
#endif
|
||||
|
||||
static const struct of_device_id ov5670_of_ids[] = {
|
||||
{ .compatible = "ovti,ov5670" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ov5670_of_ids);
|
||||
|
||||
static struct i2c_driver ov5670_i2c_driver = {
|
||||
.driver = {
|
||||
.name = "ov5670",
|
||||
.pm = &ov5670_pm_ops,
|
||||
.acpi_match_table = ACPI_PTR(ov5670_acpi_ids),
|
||||
.of_match_table = ov5670_of_ids,
|
||||
},
|
||||
.probe_new = ov5670_probe,
|
||||
.remove = ov5670_remove,
|
||||
|
|
Loading…
Reference in a new issue