summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ov772x.c
AgeCommit message (Collapse)Author
2009-08-25soc-camera: fix recently introduced overlong linesGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Paul Mundt <lethal@linux-sh.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Priority: low --- arch/sh/boards/board-ap325rxa.c | 3 ++- drivers/media/video/mt9m111.c | 9 +++++---- drivers/media/video/mt9v022.c | 5 ++++- drivers/media/video/mx1_camera.c | 3 ++- drivers/media/video/ov772x.c | 6 ++++-- drivers/media/video/pxa_camera.c | 3 ++- drivers/media/video/soc_camera.c | 14 +++++++++++--- drivers/media/video/soc_camera_platform.c | 3 ++- drivers/media/video/tw9910.c | 3 ++- include/media/soc_camera.h | 15 ++++++++++----- 10 files changed, 44 insertions(+), 20 deletions(-)
2009-08-25soc-camera: V4L2 API compliant scaling (S_FMT) and cropping (S_CROP)Guennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> The initial soc-camera scaling and cropping implementation turned out to be incompliant with the V4L2 API, e.g., it expected the user to specify cropping in output window pixels, instead of input window pixels. This patch converts the soc-camera core and all drivers to comply with the standard. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low
2009-08-25soc-camera: Use I2C device for dev_{dbg,info,...} output in all clientsGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/mt9m001.c | 20 +++++++++++--------- drivers/media/video/mt9m111.c | 11 +++++------ drivers/media/video/mt9t031.c | 16 ++++++++-------- drivers/media/video/mt9v022.c | 16 ++++++++-------- drivers/media/video/ov772x.c | 6 +++--- drivers/media/video/tw9910.c | 6 +++--- 6 files changed, 38 insertions(+), 37 deletions(-)
2009-08-25soc-camera: switch to s_crop v4l2-subdev video operationGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Remove set_crop soc-camera device method and switch to s_crop from v4l2-subdev video operations. Also extend non-i2c drivers to also hold a pointer to their v4l2-subdev instance in control device driver-data, i.e., in dev_get_drvdata((struct device *)to_soc_camera_control(icd)) Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/mt9m001.c | 23 +++--- drivers/media/video/mt9m111.c | 9 +- drivers/media/video/mt9t031.c | 9 +- drivers/media/video/mt9v022.c | 23 +++--- drivers/media/video/mx1_camera.c | 8 ++- drivers/media/video/mx3_camera.c | 7 +- drivers/media/video/ov772x.c | 19 ----- drivers/media/video/pxa_camera.c | 7 +- drivers/media/video/sh_mobile_ceu_camera.c | 110 ++++++++++++++------------- drivers/media/video/soc_camera.c | 4 +- drivers/media/video/soc_camera_platform.c | 28 ++++---- drivers/media/video/tw9910.c | 31 ++++---- include/media/soc_camera.h | 3 +- 13 files changed, 142 insertions(+), 139 deletions(-)
2009-08-25ov772x: do not use scaling for croppingGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> OV772x sensors cannot crop, they only support two fixed formats: VGA and QVGA. We should not change the format when requested to crop, only S_FMT can do this. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/ov772x.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-)
2009-08-25ov772x: S_CROP must return actually configured geometryGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L2 drivers are allowed to configure a geometry different than what has been requested by the user with S_CROP, but then they have to adjust the input rectangle accordingly. Fix ov772x to comply with this requirement. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/ov772x.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
2009-08-25ov772x: successful S_FMT and S_CROP must update user-provided rectangleGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/ov772x.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
2009-08-25soc-camera: use struct v4l2_rect in struct soc_camera_deviceGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Switch to using struct v4l2_rect in struct soc_camera_device for uniformity and simplicity. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low
2009-08-25ov772x: implement a band-stop filter supportGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> The V4L2_CID_BAND_STOP_FILTER control is used to switch the "Banding Filter" on OV772x cameras on and off and to set the minimum AEC value in BDBASE register. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/ov772x.c | 52 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 50 insertions(+), 2 deletions(-)
2009-08-25soc-camera: (partially) convert to v4l2-(sub)dev APIGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Convert the soc-camera framework to use the v4l2-(sub)dev API. Start using v4l2-subdev operations. Only a part of the interface between the soc_camera core, soc_camera host drivers on one side and soc_camera device drivers on the other side is replaced so far. The rest of the interface will be replaced in incremental steps, and will require extensions and, possibly, modifications to the v4l2-subdev code. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low
2009-08-25soc-camera: convert to platform deviceGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Convert soc-camera core and all drivers to platform device API. We already converted platforms to register a platform device for each soc-camera client, now we remove the compatibility code and switch completely to the new scheme. This is a preparatory step for the v4l2-subdev conversion. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low
2009-07-05backport commit 0a861e9eb76c68b23be1aa4758269c5b412089a9Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> kernel-sync: Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Date: Tue May 12 15:13:32 2009 +0000 soc-camera: unify i2c camera device platform data Unify i2c camera device platform data to point to struct soc_camera_link for a smooth transition to soc-camera as a platform driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-31ov772x: add edge contrl supportGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 63 +++++++++++++++++++++++++++++++++++++++-- include/media/ov772x.h | 35 +++++++++++++++++++++++ 2 files changed, 94 insertions(+), 4 deletions(-)
2009-03-31ov772x: wrong pointer for soc_camera_link is modifiedGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> priv->client->dev.platrom_data mean ov772x_camera_info in ov772x driver. So, struct soc_camera_link doesn't exist there. This patch modify this bug. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
2009-03-13ov772x: use soft sleep mode in stop_captureGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
2009-03-13soc-camera: separate S_FMT and S_CROP operationsGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> As host and camera drivers become more complex, differences between S_FMT and S_CROP functionality grow, this patch separates them. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/mt9m001.c | 19 +++- drivers/media/video/mt9m111.c | 56 +++++++--- drivers/media/video/mt9t031.c | 84 ++++++++++------ drivers/media/video/mt9v022.c | 62 +++++++---- drivers/media/video/mx3_camera.c | 157 +++++++++++++++++----------- drivers/media/video/ov772x.c | 31 +++++- drivers/media/video/pxa_camera.c | 67 +++++++++--- drivers/media/video/sh_mobile_ceu_camera.c | 17 ++- drivers/media/video/soc_camera.c | 20 ++-- drivers/media/video/soc_camera_platform.c | 9 ++- drivers/media/video/tw9910.c | 45 +++++--- include/media/soc_camera.h | 6 +- 12 files changed, 381 insertions(+), 192 deletions(-)
2009-02-23ov772x: Add image flip supportGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> o ov772x_camera_info :: flags supports default image flip. o V4L2_CID_VFLIP/HFLIP supports image flip for user side. Thank Magnus for advice. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 88 ++++++++++++++++++++++++++++++++++++++++-- include/media/ov772x.h | 5 ++ 2 files changed, 89 insertions(+), 4 deletions(-)
2009-02-23ov772x: bit mask operation fix on ov772x_mask_set.Guennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
2009-02-23ov772x: setting method to register is changed.Guennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Color format regs array had been used, but it was not easy to understand what to want to do, and additional bit became complex. This patch modify this problem. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 121 +++++++++++++++++------------------------- 1 files changed, 48 insertions(+), 73 deletions(-)
2009-02-23ov772x: move configuration from start_capture() to set_fmt()Guennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> soc_camera framework requires, that camera configuration is performed in set_fmt, and start_capture and stop_capture only turn the camera on/off. This patch modifies ov772x to comply to this requirement. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 125 +++++++++++++++++++++--------------------- 1 files changed, 62 insertions(+), 63 deletions(-)
2009-02-23soc-camera: add data signal polarity flags to driversGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> All soc-camera camera and host drivers must specify supported data signal polarity, after all drivers are fixed, we'll add a suitable test to soc_camera_bus_param_compatible(). Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- arch/sh/boards/board-ap325rxa.c | 3 ++- arch/sh/boards/mach-migor/setup.c | 5 +++-- drivers/media/video/mt9m001.c | 2 +- drivers/media/video/mt9m111.c | 2 +- drivers/media/video/mt9v022.c | 2 +- drivers/media/video/ov772x.c | 2 +- drivers/media/video/pxa_camera.c | 1 + 7 files changed, 10 insertions(+), 7 deletions(-)
2008-12-30v4l2: debugging API changed to match against driver name instead of ID.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Since the i2c driver ID will be removed in the near future we have to modify the v4l2 debugging API to use the driver name instead of driver ID. Note that this API is not used in applications other than v4l2-dbg.cpp as it is for debugging and testing only. Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged with a warning that it is deprecated and will be removed in 2.6.30. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-29ov772x: fix try_fmt calculation methodGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Don't modify driver's state in try_fmt, just verify format acceptability or adjust it to driver's capabilities. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 55 ++++++++++++++++++++++++++--------------- 1 files changed, 35 insertions(+), 20 deletions(-)
2008-12-29ov772x: clear i2c client data on error and removeGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
2008-12-29ov772x: change dev_info to dev_dbgGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
2008-12-23soc-camera: Add signal inversion flags to be used by camera driversGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> As reported by Antonio Ospite <ospite@studenti.unina.it> two platforms with a mt9m111 camera require opposite pixel clock polarity, which means one of them inverts it. This patch adds support for inversion flags and switches all available camera drivers to using them. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/mt9m001.c | 15 +++++++-------- drivers/media/video/mt9m111.c | 6 +++++- drivers/media/video/mt9v022.c | 3 +++ drivers/media/video/ov772x.c | 10 +++++----- drivers/media/video/soc_camera.c | 34 ++++++++++++++++++++++++++++++++++ include/media/soc_camera.h | 11 +++++++++++ 6 files changed, 65 insertions(+), 14 deletions(-)
2008-12-18Add ov7725 support to ov772x driverGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 22 ++++++++++++++++++++++ include/media/v4l2-chip-ident.h | 1 + 2 files changed, 23 insertions(+), 0 deletions(-)
2008-12-18Change device ID selection method on ov772x driverGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2008-12-17Remove ov772x_default_regs from ov772x driverGuennadi Liakhovetski
From: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 21 +++------------------ 1 files changed, 3 insertions(+), 18 deletions(-)
2008-12-01soc-camera: simplify namingGuennadi Liakhovetski
We anyway don't follow the s_fmt_vid_cap / g_fmt_vid_cap / try_fmt_vid_cap naming, and soc-camera is so far only about video capture, let's simplify operation names a bit further. set_fmt_cap / try_fmt_cap wasn't a very good choice too. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/mt9m001.c | 14 +++++++------- drivers/media/video/mt9m111.c | 12 ++++++------ drivers/media/video/mt9v022.c | 14 +++++++------- drivers/media/video/ov772x.c | 14 +++++++------- drivers/media/video/pxa_camera.c | 16 ++++++++-------- drivers/media/video/sh_mobile_ceu_camera.c | 16 ++++++++-------- drivers/media/video/soc_camera.c | 6 +++--- drivers/media/video/soc_camera_platform.c | 12 ++++++------ include/media/soc_camera.h | 10 ++++------ 9 files changed, 56 insertions(+), 58 deletions(-)
2008-12-01Register name fix for ov772x driverKuninori Morimoto
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 48 +++++++++++++++++++++--------------------- 1 files changed, 24 insertions(+), 24 deletions(-)
2008-12-01Change power on/off sequence on ov772xKuninori Morimoto
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/ov772x.c | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-)
2008-10-30ov772x: fix compilation for pre-2.6.26 kernelsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-10-24Add ov772x driverKuninori Morimoto
This patch adds ov772x driver that use soc_camera framework. It was tested on SH Migo-r board. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- Patch v7 -> v8 fix SWAP_MASK mistake remove empty lines. drivers/media/video/Kconfig | 6 + drivers/media/video/Makefile | 1 + drivers/media/video/ov772x.c | 966 +++++++++++++++++++++++++++++++++++++++ include/media/ov772x.h | 21 + include/media/v4l2-chip-ident.h | 1 + 5 files changed, 995 insertions(+), 0 deletions(-) create mode 100644 drivers/media/video/ov772x.c create mode 100644 include/media/ov772x.h