aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/ov9640.h
diff options
context:
space:
mode:
authorPetr Cvek <petrcvekcz@gmail.com>2018-12-13 10:39:13 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-01-16 13:17:09 -0500
commit9f7e55d235b62e95043917fcb86a87064678074c (patch)
tree8ad04ed6ab3779cd8c96ac8f5511f3514e97db4f /drivers/media/i2c/ov9640.h
parentmedia: soc_camera: ov9640: move ov9640 out of soc_camera (diff)
downloadlinux-dev-9f7e55d235b62e95043917fcb86a87064678074c.tar.xz
linux-dev-9f7e55d235b62e95043917fcb86a87064678074c.zip
media: i2c: ov9640: drop soc_camera code and switch to v4l2_async
This patch removes the dependency on an obsoleted soc_camera from ov9640 driver and changes the code to be a standalone v4l2 async subdevice. It also adds GPIO allocations for power and reset signals (as they are not handled by soc_camera now). The values for waiting on GPIOs (reset and power) settling down were taken from the datasheet (> 1 ms after HW/SW reset). The upper limit was chosen as an arbitrary value. Also one occurrence of mdelay() was changed to msleep(). The delays were successfully tested on a real hardware. The patch makes ov9640 sensor again compatible with the pxa_camera driver. Signed-off-by: Petr Cvek <petrcvekcz@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/ov9640.h')
-rw-r--r--drivers/media/i2c/ov9640.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/i2c/ov9640.h b/drivers/media/i2c/ov9640.h
index 65d13ff17536..be5e4b29ac69 100644
--- a/drivers/media/i2c/ov9640.h
+++ b/drivers/media/i2c/ov9640.h
@@ -200,6 +200,8 @@ struct ov9640_priv {
struct v4l2_subdev subdev;
struct v4l2_ctrl_handler hdl;
struct v4l2_clk *clk;
+ struct gpio_desc *gpio_power;
+ struct gpio_desc *gpio_reset;
int model;
int revision;