From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Sylwester Nawrocki <s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] v4l: mt9v032: Add OF support
Date: Fri, 13 Mar 2015 01:41:35 +0200 [thread overview]
Message-ID: <2140837.pMzBpl3YU4@avalon> (raw)
In-Reply-To: <54FD9074.8050600-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Hi Sylwester,
On Monday 09 March 2015 13:22:12 Sylwester Nawrocki wrote:
> On 09/03/15 12:29, Laurent Pinchart wrote:
> > On Monday 09 March 2015 11:35:52 Sylwester Nawrocki wrote:
> >> On 08/03/15 14:45, Laurent Pinchart wrote:
> >>> +++ b/Documentation/devicetree/bindings/media/i2c/mt9v032.txt
> >>> @@ -0,0 +1,41 @@
> >>> +* Aptina 1/3-Inch WVGA CMOS Digital Image Sensor
> >>> +
> >>> +The Aptina MT9V032 is a 1/3-inch CMOS active pixel digital image sensor
> >>> with
> >>> +an active array size of 752H x 480V. It is programmable through a
> >>> simple
> >>> +two-wire serial interface.
> >>> +
> >>> +Required Properties:
> >>> +
> >>> +- compatible: value should be either one among the following
> >>> + (a) "aptina,mt9v032" for MT9V032 color sensor
> >>> + (b) "aptina,mt9v032m" for MT9V032 monochrome sensor
> >>> + (c) "aptina,mt9v034" for MT9V034 color sensor
> >>> + (d) "aptina,mt9v034m" for MT9V034 monochrome sensor
> >>
> >> It can't be determined at runtime whether the sensor is just
> >> monochromatic ?
> >
> > Unfortunately not. As far as I'm aware the only difference between the
> > monochromatic and color sensors is the colour filter array. The register
> > set is identical.
> >
> >> Al in all the color filter array is a physical property of the sensor,
> >> still the driver seems to be ignoring the "m" suffix.
> >
> > No, the driver relies on the I2C core filling returning the I2C device id
> > instance corresponding to the DT compatible string, and gets sensor model
> > information from id->driver_data.
>
> Sorry, I missed the I2C id part.
>
> >> Hence I suspect the
> >> register interfaces for both color and monochromatic versions are
> >> compatible. I'm wondering whether using a boolean property to indicate
> >> the
> >> color filter array type would do as well.
> >
> > That's an option as well, yes. I don't have a strong preference at the
> > moment, but it should be noted that the "m" suffix is contained in the
> > chip's part number.
> >
> > MT9V032C12STM
> > MT9V032C12STC
> > MT9V032C12STMD
> > MT9V032C12STMH
> > MT9V032C12STCD
> > MT9V032C12STCH
> >
> > Granted, they use "c" for colour sensors, which the DT bindings don't use,
> > and a "C12ST" that we completely ignore.
>
> OK, deriving the compatible strings from current I2C device ids seems less
> trouble from the driver's writer POV. However, my feeling is that using same
> compatible and additional property to indicate colour/monochrome is cleaner
> as far as device tree binding is concerned.
> Anyway, I'm not going to object against your current approach, I suppose
> it's acceptable as well.
It wouldn't take much to convince me about that, I'm really undecided. I'll
send v2 to fix other issues, we can continue discussing this point then.
--
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
prev parent reply other threads:[~2015-03-12 23:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 13:45 [PATCH] v4l: mt9v032: Add OF support Laurent Pinchart
2015-03-09 9:45 ` Carlos Sanmartín Bustos
[not found] ` <CAPW4HR1WJPWg64GwitxCPK2jop0CntS1UtsOu_0VjCz0BEke6A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-09 11:19 ` Laurent Pinchart
2015-03-09 16:03 ` Carlos Sanmartín Bustos
2015-03-09 10:35 ` Sylwester Nawrocki
2015-03-09 10:57 ` Sakari Ailus
2015-03-09 11:57 ` Sylwester Nawrocki
[not found] ` <54FD7788.2020709-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-03-09 11:29 ` Laurent Pinchart
2015-03-09 12:22 ` Sylwester Nawrocki
[not found] ` <54FD9074.8050600-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-03-12 23:41 ` Laurent Pinchart [this message]
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=2140837.pMzBpl3YU4@avalon \
--to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@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).