From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
Cc: Jacopo Mondi
<jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>,
magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
geert-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org,
mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
sakari.ailus-X3B1VOXEql0@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
pombredanne-od1rfyK75/E@public.gmane.org,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v5 6/9] media: i2c: ov772x: Remove soc_camera dependencies
Date: Tue, 16 Jan 2018 13:45:47 +0200 [thread overview]
Message-ID: <3160666.n1yGRyzbCt@avalon> (raw)
In-Reply-To: <d0249577-ebd5-aa4d-b017-c11fae9c612a-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
Hi Hans,
On Tuesday, 16 January 2018 12:08:17 EET Hans Verkuil wrote:
> On 01/12/2018 03:04 PM, Jacopo Mondi wrote:
> > Remove soc_camera framework dependencies from ov772x sensor driver.
> > - Handle clock and gpios
> > - Register async subdevice
> > - Remove soc_camera specific g/s_mbus_config operations
> > - Change image format colorspace from JPEG to SRGB as the two use the
> >
> > same colorspace information but JPEG makes assumptions on color
> > components quantization that do not apply to the sensor
> >
> > - Remove sizes crop from get_selection as driver can't scale
> > - Add kernel doc to driver interface header file
> > - Adjust build system
> >
> > This commit does not remove the original soc_camera based driver as long
> > as other platforms depends on soc_camera-based CEU driver.
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
> > Reviewed-by: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
> > ---
> >
> > drivers/media/i2c/Kconfig | 11 +++
> > drivers/media/i2c/Makefile | 1 +
> > drivers/media/i2c/ov772x.c | 177 ++++++++++++++++++++++++++++------------
> > include/media/i2c/ov772x.h | 6 +-
> > 4 files changed, 133 insertions(+), 62 deletions(-)
[snip]
> > diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c
> > index 8063835..df2516c 100644
> > --- a/drivers/media/i2c/ov772x.c
> > +++ b/drivers/media/i2c/ov772x.c
[snip]
> > @@ -1038,12 +1074,11 @@ static int ov772x_probe(struct i2c_client *client,
> > const struct i2c_device_id *did)
> > {
> > struct ov772x_priv *priv;
> > - struct soc_camera_subdev_desc *ssdd = soc_camera_i2c_to_desc(client);
> > - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
> > + struct i2c_adapter *adapter = client->adapter;
> > int ret;
> >
> > - if (!ssdd || !ssdd->drv_priv) {
> > - dev_err(&client->dev, "OV772X: missing platform data!\n");
> > + if (!client->dev.platform_data) {
> > + dev_err(&client->dev, "Missing OV7725 platform data\n");
>
> Nitpick: I'd prefer lowercase in this string: ov7725. It also should be
> ov772x.
Agreed.
> > return -EINVAL;
> >
> > }
[snip]
> > @@ -1119,6 +1176,6 @@ static struct i2c_driver ov772x_i2c_driver = {
> >
> > module_i2c_driver(ov772x_i2c_driver);
> >
> > -MODULE_DESCRIPTION("SoC Camera driver for ov772x");
> > +MODULE_DESCRIPTION("V4L2 driver for OV772x image sensor");
>
> Ditto: lower case ov772x.
I'd keep that uppercase. The usual practice (unless I'm mistaken) is to use
uppercase for chip names and lowercase for driver names. The description
clearly refers to the chip, so uppercase seems better to me.
> > MODULE_AUTHOR("Kuninori Morimoto");
> > MODULE_LICENSE("GPL v2");
>
> Hmm, shouldn't there be a struct of_device_id as well? So this can be
> used in the device tree?
>
> I see this sensor was only tested with a non-dt platform. Is it possible
> to test this sensor with the GR-Peach platform (which I gather uses the
> device tree)?
>
> Making this driver DT compliant can be done as a follow-up patch.
I think it's a good idea, but I'd prefer having that in a separate patch. We
will also need DT bindings, it's a bit out of scope for this series.
Jacopo, you can keep my ack after addressing Hans' comments.
--
Regards,
Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-01-16 11:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 14:04 [PATCH v5 0/9] Renesas Capture Engine Unit (CEU) V4L2 driver Jacopo Mondi
2018-01-12 14:04 ` [PATCH v5 1/9] dt-bindings: media: Add Renesas CEU bindings Jacopo Mondi
2018-01-16 9:49 ` Hans Verkuil
2018-01-12 14:04 ` [PATCH v5 2/9] include: media: Add Renesas CEU driver interface Jacopo Mondi
2018-01-16 9:49 ` Hans Verkuil
2018-01-12 14:04 ` [PATCH v5 3/9] v4l: platform: Add Renesas CEU driver Jacopo Mondi
[not found] ` <1515765849-10345-4-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
2018-01-16 9:46 ` Hans Verkuil
2018-01-16 11:53 ` Laurent Pinchart
2018-01-16 17:18 ` jacopo mondi
2018-01-12 14:04 ` [PATCH v5 4/9] ARM: dts: r7s72100: Add Capture Engine Unit (CEU) Jacopo Mondi
2018-01-16 9:50 ` Hans Verkuil
2018-01-12 14:04 ` [PATCH v5 5/9] v4l: i2c: Copy ov772x soc_camera sensor driver Jacopo Mondi
2018-01-16 9:47 ` Hans Verkuil
2018-01-12 14:04 ` [PATCH v5 6/9] media: i2c: ov772x: Remove soc_camera dependencies Jacopo Mondi
2018-01-16 10:08 ` Hans Verkuil
[not found] ` <d0249577-ebd5-aa4d-b017-c11fae9c612a-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2018-01-16 11:45 ` Laurent Pinchart [this message]
2018-01-16 14:02 ` jacopo mondi
2018-01-12 14:04 ` [PATCH v5 7/9] v4l: i2c: Copy tw9910 soc_camera sensor driver Jacopo Mondi
2018-01-16 9:48 ` Hans Verkuil
2018-01-12 14:04 ` [PATCH v5 8/9] media: i2c: tw9910: Remove soc_camera dependencies Jacopo Mondi
2018-01-16 10:11 ` Hans Verkuil
2018-01-12 14:04 ` [PATCH v5 9/9] arch: sh: migor: Use new renesas-ceu camera driver Jacopo Mondi
2018-01-16 10:11 ` Hans Verkuil
2018-01-12 14:27 ` [PATCH v5 0/9] Renesas Capture Engine Unit (CEU) V4L2 driver Laurent Pinchart
2018-01-15 6:55 ` jacopo mondi
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=3160666.n1yGRyzbCt@avalon \
--to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=geert-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org \
--cc=hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org \
--cc=jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=pombredanne-od1rfyK75/E@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sakari.ailus-X3B1VOXEql0@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).