From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: phil.edworthy@renesas.com
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Hans Verkuil <hverkuil@xs4all.nl>,
Jean-Philippe Francois <jp.francois@cynove.com>,
linux-media@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@redhat.com>
Subject: Re: [PATCH v3] ov10635: Add OmniVision ov10635 SoC camera driver
Date: Wed, 17 Jul 2013 12:40:23 +0200 [thread overview]
Message-ID: <2551685.bvvVTulDIc@avalon> (raw)
In-Reply-To: <OFFCCBF395.6ECC99A5-ON80257BAA.004C2329-80257BAA.004C6AA9@eu.necel.com>
Hi Phil,
On Tuesday 16 July 2013 14:54:41 phil.edworthy@renesas.com wrote:
> On 16/07/2013 13:05 Laurent Pinchart wrote:
> > On Wednesday 05 June 2013 10:11:35 Phil Edworthy wrote:
> > > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > > ---
> > >
> > > v3:
> > > - Removed dupplicated writes to reg 0x3042
> > > - Program all the standard registers after checking the ID
> > >
> > > v2:
> > > - Simplified flow in ov10635_s_ctrl.
> > > - Removed chip ident code - build tested only
> > >
> > > drivers/media/i2c/soc_camera/Kconfig | 6 +
> > > drivers/media/i2c/soc_camera/Makefile | 1 +
> > > drivers/media/i2c/soc_camera/ov10635.c | 1134 +++++++++++++++++++++++++
> > > 3 files changed, 1141 insertions(+)
> > > create mode 100644 drivers/media/i2c/soc_camera/ov10635.c
[snip]
> > > diff --git a/drivers/media/i2c/soc_camera/ov10635.c
> > > b/drivers/media/i2c/soc_camera/ov10635.c new file mode 100644
> > > index 0000000..064cc7b
> > > --- /dev/null
> > > +++ b/drivers/media/i2c/soc_camera/ov10635.c
> > > @@ -0,0 +1,1134 @@
> > > +/*
> > > + * OmniVision OV10635 Camera Driver
> > > + *
> > > + * Copyright (C) 2013 Phil Edworthy
> > > + * Copyright (C) 2013 Renesas Electronics
> > > + *
> > > + * This driver has been tested at QVGA, VGA and 720p, and 1280x800 at
> > > + * up to 30fps and it should work at any resolution in between and any
> > > + * frame rate up to 30fps.
> > > + *
> > > + * FIXME:
> > > + * Horizontal flip (mirroring) does not work correctly. The image is
> > > + * flipped, but the colors are wrong.
Have you checked whether this could be fixed by shifting the crop rectangle by
one pixel ? Color issues with flipping are usually due to the fact that
flipping modifies the Bayer pattern.
> > > + *
> > > + * This program is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU General Public License version
> > > + * 2 as published by the Free Software Foundation.
> > > + *
> > > + */
> > > +
> > > +#include <linux/delay.h>
> > > +#include <linux/i2c.h>
> > > +#include <linux/init.h>
> > > +#include <linux/module.h>
> > > +#include <linux/slab.h>
> > > +#include <linux/v4l2-mediabus.h>
> > > +#include <linux/videodev2.h>
> > > +
> > > +#include <media/soc_camera.h>
> > > +#include <media/v4l2-common.h>
> > > +#include <media/v4l2-ctrls.h>
> > > +
> > > +/* Register definitions */
> > > +#define OV10635_VFLIP 0x381c
> > > +#define OV10635_VFLIP_ON (0x3 << 6)
> > > +#define OV10635_VFLIP_SUBSAMPLE 0x1
> > > +#define OV10635_HMIRROR 0x381d
> > > +#define OV10635_HMIRROR_ON 0x3
> > > +#define OV10635_PID 0x300a
> > > +#define OV10635_VER 0x300b
> > > +
> > > +/* IDs */
> > > +#define OV10635_VERSION_REG 0xa635
> > > +#define OV10635_VERSION(pid, ver) (((pid) << 8) | ((ver) & 0xff))
> > > +
> > > +#define OV10635_SENSOR_WIDTH 1312
> > > +#define OV10635_SENSOR_HEIGHT 814
> > > +
> > > +#define OV10635_MAX_WIDTH 1280
> > > +#define OV10635_MAX_HEIGHT 800
[snip]
> > > +static const struct ov10635_reg ov10635_regs_enable[] = {
> > > + { 0x3042, 0xf0 }, { 0x301b, 0xf0 }, { 0x301c, 0xf0 },
> > > + { 0x301a, 0xf0 },
> > > +};
> >
> > Could you please define macros for register addresses and values ? I
> > know it's quite a bit of boring work, but without that maintening the
> > driver would be pretty difficult.
>
> I will ask OmniVision if I can provide the register names.
A quick search unfortunately revealed no leak datasheets, so permission will
indeed be required.
> However, I
> assume you don't mean I should define macros for all of the registers in
> the ov10635_regs_default array?
Ideally that would be great, but I won't nak the patch because of that.
http://git.linuxtv.org/pinchartl/media.git/blob/refs/heads/sensors/ov3640:/drivers/media/i2c/ov3640_regs.h
:-)
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-07-17 10:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 9:35 [PATCH] ov10635: Add OmniVision ov10635 SoC camera driver Phil Edworthy
2013-06-03 9:49 ` Hans Verkuil
2013-06-03 13:31 ` phil.edworthy
2013-06-03 13:47 ` Hans Verkuil
2013-06-03 16:18 ` [PATCH v2] " Phil Edworthy
2013-06-04 8:37 ` jean-philippe francois
2013-06-04 17:22 ` phil.edworthy
2013-06-05 9:11 ` [PATCH v3] " Phil Edworthy
2013-07-14 20:37 ` Guennadi Liakhovetski
2013-07-15 9:07 ` phil.edworthy
2013-07-15 9:24 ` Guennadi Liakhovetski
2013-07-15 9:32 ` phil.edworthy
2013-07-15 9:42 ` Guennadi Liakhovetski
2013-07-29 7:59 ` phil.edworthy
2013-07-29 8:54 ` Guennadi Liakhovetski
2013-07-18 9:11 ` phil.edworthy
2013-07-18 9:27 ` Guennadi Liakhovetski
2013-07-18 9:42 ` phil.edworthy
2013-07-16 12:06 ` Laurent Pinchart
2013-07-16 13:54 ` phil.edworthy
2013-07-17 10:40 ` Laurent Pinchart [this message]
2013-06-05 9:24 ` [PATCH v2] " Guennadi Liakhovetski
2013-06-05 10:51 ` phil.edworthy
2013-06-06 7:47 ` jean-philippe francois
2013-06-06 8:00 ` Guennadi Liakhovetski
2013-07-12 8:15 ` phil.edworthy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2551685.bvvVTulDIc@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=g.liakhovetski@gmx.de \
--cc=hverkuil@xs4all.nl \
--cc=jp.francois@cynove.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=phil.edworthy@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox