devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	DLOS <davinci-linux-open-source@linux.davincidsp.com>,
	LMML <linux-media@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	LAK <linux-arm-kernel@lists.infradead.org>,
	Sekhar Nori <nsekhar@ti.com>, LDOC <linux-doc@vger.kernel.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Rob Landley <rob@landley.net>, Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [PATCH] media: i2c: adv7343: fix the DT binding properties
Date: Mon, 30 Sep 2013 16:41:38 +0200	[thread overview]
Message-ID: <12127401.nFSuWlICDy@avalon> (raw)
In-Reply-To: <CA+V-a8sEPAFz=Jo9LdwRf5QtnY6TFXzSTrtHQuyeb3uSEYCvSQ@mail.gmail.com>

Hi Prabhakar,

On Monday 30 September 2013 18:57:01 Prabhakar Lad wrote:
> On Mon, Sep 23, 2013 at 8:18 AM, Prabhakar Lad wrote:
> > On Fri, Sep 20, 2013 at 3:22 PM, Sylwester Nawrocki wrote:
> >> On 09/20/2013 10:11 AM, Prabhakar Lad wrote:
> >>> OK I will, just send out a fix up patch which fixes the mismatch between
> >>> names for the rc-cycle, and later send out a patch which removes the
> >>> platform data usage for next release with proper DT bindings.
> >> 
> >> I think the binding need to be fully corrected now, I just meant to not
> >> touch the board file, i.e. leave non-dt support unchanged.
> > 
> > Ok
> > 
> >>> I'm OK with making regulator properties as optional, But still it would
> >>> change the meaning of what DT is, we know that the VDD/VDD_IO .. etc
> >>> pins are required properties (but still making them as optional) :-(
> >>> 
> >>> I think there might several devices where this situation may arise so
> >>> just thinking of a alternative solution.
> >>> 
> >>> say we have property 'software-regulator' which takes true/false(0/1)
> >>> If set to true we make the regulators as required property or else we
> >>> assume it is handled and ignore it ?
> >> 
> >> I don't think this is a good idea. You would have to add a similar
> >> platform data flag for non-dt, it doesn't sound right. I can see two
> >> options here:
> >> 
> >> 1. Make the regulator properties mandatory and, e.g. define a fixed
> >>    voltage GPIO regulator in DT with an empty 'gpio' property. Then
> >>    pass a phandle to that regulator in the adv7343 *-supply properties.
> >>    For non-dt similarly a fixed voltage regulator(s) and voltage
> >>    supplies  would need to be defined in the board files.
> >> 
> >> 2. Make the properties optional and use (devm_)regulator_get_optional()
> >>    calls in the driver (a recently added function). I must admit I don't
> >>    fully understand description of this function, it currently looks
> >>    pretty much same as (devm_)regulator_get(). Thus the driver would
> >>    need to be handling regulator supplies only when non ERR_PTR() is
> >>    returned from regulator_get_optional() and otherwise assume a non
> >>    critical error. There is already quite a few example occurrences of
> >>    regulator_get_optional() usage.
> 
> The same question arises in case of the clock, The adv7343 encoder has two
> input clocks CLKIN_A and CLKIN_B. I case of da850 EVM the clock source to
> adv7343 encoder is fixed source which is enabled by default so none of the
> bridge nor the adv7343 driver cares of the clock to enable/disable. So in
> this case should I be registering  (v4l2_clk_register() /
> v4l2_clk_unregister()) a dummy clock in the bridge driver or in the board
> file ?

The fixed clock (which is a real clock, not a dummy clock) should be 
registered in board file, preferably using the common clock framework if 
that's available on your platform.

-- 
Regards,

Laurent Pinchart


      reply	other threads:[~2013-09-30 14:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 11:57 [PATCH] media: i2c: adv7343: fix the DT binding properties Prabhakar Lad
     [not found] ` <1379073471-7244-1-git-send-email-prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-13 22:46   ` Stephen Warren
     [not found]     ` <523395DC.5080009-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-14  5:23       ` Prabhakar Lad
     [not found]         ` <CA+V-a8sVyJ1TrTSiaj8vpaD+f_qJ5Hp287E3HuHJ_pRzzmdAvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-16 16:24           ` Stephen Warren
     [not found]             ` <523730A8.9060201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-19 16:06               ` Prabhakar Lad
     [not found]                 ` <CA+V-a8vY-qsdUoUUH=3HOg-UAZZPujOLPHFC_udNWFtksgzRRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-19 19:49                   ` Sylwester Nawrocki
     [not found]                     ` <523B554A.2030701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-20  8:11                       ` Prabhakar Lad
     [not found]                         ` <CA+V-a8s3PYr7qem6m8au0E7N2Xb_gD37_8uLcdXZjeHppBaC6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-20  9:52                           ` Sylwester Nawrocki
2013-09-23  2:48                             ` Prabhakar Lad
     [not found]                               ` <CA+V-a8u5_rhxTgkVgCbtmGpaZCt2ciu4vABW4t80aSp7csttnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-23 11:50                                 ` Laurent Pinchart
2013-09-23 21:33                                   ` Stephen Warren
     [not found]                                     ` <5240B396.2010705-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-24  6:15                                       ` Prabhakar Lad
2013-09-24  9:44                                     ` Laurent Pinchart
2013-09-24 15:52                                       ` Mark Brown
2013-09-24 15:54                                   ` Mark Brown
2013-09-30 13:27                               ` Prabhakar Lad
2013-09-30 14: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=12127401.nFSuWlICDy@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hans.verkuil@cisco.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nsekhar@ti.com \
    --cc=pawel.moll@arm.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --cc=swarren@wwwdotorg.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).