From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Ajay kumar <ajaynumb@gmail.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Ajay Kumar <ajaykumar.rs@samsung.com>,
InKi Dae <inki.dae@samsung.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Rob Clark <robdclark@gmail.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Sean Paul <seanpaul@google.com>, Jingoo Han <jg1.han@samsung.com>,
sunil joshi <joshi@samsung.com>,
Prashanth G <prashanth.g@samsung.com>
Subject: Re: [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties
Date: Tue, 23 Sep 2014 03:00:37 +0300 [thread overview]
Message-ID: <7550026.qs7FRi8hDC@avalon> (raw)
In-Reply-To: <20140922113514.GS1470@ulmo>
[-- Attachment #1: Type: text/plain, Size: 7075 bytes --]
On Monday 22 September 2014 13:35:15 Thierry Reding wrote:
> On Mon, Sep 22, 2014 at 04:53:22PM +0530, Ajay kumar wrote:
> > On Mon, Sep 22, 2014 at 4:11 PM, Thierry Reding wrote:
> > > On Mon, Sep 22, 2014 at 02:01:38PM +0530, Ajay kumar wrote:
> > >> On Mon, Sep 22, 2014 at 1:40 PM, Thierry Reding wrote:
> > >> > On Thu, Sep 18, 2014 at 11:20:40AM +0530, Ajay kumar wrote:
> > >> >> On Wed, Sep 17, 2014 at 9:52 PM, Tomi Valkeinen wrote:
> > >> >> > On 17/09/14 17:29, Ajay kumar wrote:
> > >> >> >> On Wed, Sep 17, 2014 at 5:22 PM, Tomi Valkeinen wrote:
> > >> >> >>> On 27/08/14 17:39, Ajay Kumar wrote:
> > >> >> >>>> Add documentation for DT properties supported by ps8622/ps8625
> > >> >> >>>> eDP-LVDS converter.
> > >> >> >>>>
> > >> >> >>>> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> > >> >> >>>> ---
> > >> >> >>>>
> > >> >> >>>> .../devicetree/bindings/video/bridge/ps8622.txt | 20
> > >> >> >>>> ++++++++++++++++++++ 1 file changed, 20 insertions(+)
> > >> >> >>>> create mode 100644
> > >> >> >>>> Documentation/devicetree/bindings/video/bridge/ps8622.txt
> > >> >> >>>>
> > >> >> >>>> diff --git
> > >> >> >>>> a/Documentation/devicetree/bindings/video/bridge/ps8622.txt
> > >> >> >>>> b/Documentation/devicetree/bindings/video/bridge/ps8622.txt
> > >> >> >>>> new file mode 100644
> > >> >> >>>> index 0000000..0ec8172
> > >> >> >>>> --- /dev/null
> > >> >> >>>> +++ b/Documentation/devicetree/bindings/video/bridge/ps8622.txt
> > >> >> >>>> @@ -0,0 +1,20 @@
> > >> >> >>>> +ps8622-bridge bindings
> > >> >> >>>> +
> > >> >> >>>> +Required properties:
> > >> >> >>>> + - compatible: "parade,ps8622" or "parade,ps8625"
> > >> >> >>>> + - reg: first i2c address of the bridge
> > >> >> >>>> + - sleep-gpios: OF device-tree gpio specification for PD_
> > >> >> >>>> pin.
> > >> >> >>>> + - reset-gpios: OF device-tree gpio specification for RST_
> > >> >> >>>> pin.
> > >> >> >>>> +
> > >> >> >>>> +Optional properties:
> > >> >> >>>> + - lane-count: number of DP lanes to use
> > >> >> >>>> + - use-external-pwm: backlight will be controlled by an
> > >> >> >>>> external PWM
> > >> >> >>>
> > >> >> >>> What does this mean? That the backlight support from ps8625 is
> > >> >> >>> not used? If so, maybe "disable-pwm" or something?
> > >> >> >>
> > >> >> >> "use-external-pwm" or "disable-bridge-pwm" would be better.
> > >> >> >
> > >> >> > Well, the properties are about the bridge. "use-external-pwm"
> > >> >> > means that the bridge uses an external PWM, which, if I understood
> > >> >> > correctly, is not what the property is about.
> > >> >> >
> > >> >> > "disable-bridge-pwm" is ok, but the "bridge" there is extra. The
> > >> >> > properties are about the bridge, so it's implicit.
> > >> >>
> > >> >> Ok. I will use "disable-pwm".
> > >> >
> > >> > Why is this even necessary? According to the datasheet this device
> > >> > has circuitry for backlight control. If so, I'd expect it to expose
> > >> > either a backlight device or a PWM device. That way unless somebody
> > >> > is using the backlight/PWM exposed by the bridge the bridge can
> > >> > simply disable PWM.
> > >>
> > >> The driver does expose a backlight device.
> > >> And, the decision(whether to expose a backlight device or not) is made
> > >> based on the DT flag "use-external-pwm".
> > >> This was discussed before, and you suggested to use the boolean
> > >> property, refer to this link:
> > >> http://lists.freedesktop.org/archives/dri-devel/2014-July/065048.html
> > >
> > > I think you misunderstood what I said, or maybe I didn't explain clearly
> > > what I meant. If the PS8622 provides a backlight there's nothing wrong
> > > with always exposing it. The bridge itself isn't going to be using the
> > > backlight anyway. Rather the panel itself should be using the backlight
> > > device exposed by PS8622 or some separate backlight device.
> > >
> > > To illustrate by an example:
> > > ps8622: ... {
> > >
> > > compatible = "parade,ps8622";
> > > ...
> > >
> > > };
> > >
> > > panel {
> > >
> > > ...
> > > backlight = <&ps8622>;
> > > ...
> > >
> > > };
> >
> > No, if ps8622 backlight control is used, we need not specify the backlight
> > phandle for the panel driver. Somehow, ps8622 internal circuitry keeps
> > the bootup glitch free :)
> > Backlight control and panel controls can be separate then.
>
> But they shouldn't. Your panel driver should always be the one to
> control backlight. How else is the bridge supposed to know when to turn
> backlight on or off?
>
> > > What you did in v6 of this series was look up a backlight device and
> > > then not use it. That seemed unnecessary. Looking at v6 again the reason
> > > for getting a phandle to the backlight was so that the device itself did
> > > not expose its own backlight controlling circuitry if an external one
> > > was being used. But since the bridge has no business controlling the
> > > backlight, having the backlight phandle in the bridge is not correct.
> > >
> > > So I think what you could do in the driver instead is always expose the
> > > backlight device. If the panel used a different backlight, the PS8622's
> > > internal on simply wouldn't be accessed. It would still be possible to
> > > control the backlight in sysfs, but that shouldn't be a problem (only
> > > root can access it)
> >
> > That would be like simple exposing a feature which cannot be used
> > by the user, ideally which "should not be" used by the user.
>
> And it won't be used unless they access the sysfs files directly. There
> are a lot of cases where we expose functionality that cannot be
> meaningfully used by the user. For example, a GPIO may not be routed to
> anything on a board, yet we don't explicitly hide any specific GPIOs
> from users.
>
> > > That said, I have no strong objections to the boolean property if you
> > > feel like it's really necessary.
> >
> > Won't you think having a boolean property for an optional
> > feature of the device, is better than all these?
>
> Like I said, I'm indifferent on the matter. I don't think it's necessary
> to hide the backlight device, but if you want to, please feel free to do
> so.
DT typically use
status = "disabled"
to disable devices. In this case we don't want to disable the ps8622
completely, but just one of its functions. Maybe a "backlight-status" property
could be used for that ? If that's considered too verbose, I would be fine
with a "disable-<feature>" boolean property too.
> Another alternative would be not to expose it at all and not have the
> boolean property since you don't seem to have a way to test it in the
> first place (or at least there's no device support upstream where it's
> needed).
--
Regards,
Laurent Pinchart
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-09-23 0:00 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 14:39 [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties Ajay Kumar
2014-08-27 14:39 ` [PATCH V7 10/12] Documentation: devicetree: Add vendor prefix for parade Ajay Kumar
2014-08-27 14:39 ` [PATCH V7 09/12] Documentation: drm: bridge: move to video/bridge Ajay Kumar
2014-09-17 11:52 ` [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties Tomi Valkeinen
2014-09-17 14:29 ` Ajay kumar
2014-09-17 16:22 ` Tomi Valkeinen
2014-09-18 5:50 ` Ajay kumar
2014-09-19 12:54 ` Tomi Valkeinen
2014-09-19 13:59 ` Ajay kumar
2014-09-19 14:28 ` Tomi Valkeinen
2014-09-20 11:22 ` Ajay kumar
2014-09-20 15:27 ` Javier Martinez Canillas
2014-09-22 6:00 ` Ajay kumar
2014-09-22 15:05 ` Tomi Valkeinen
2014-10-07 10:30 ` Tomi Valkeinen
2014-10-07 10:36 ` Ajay kumar
2014-10-07 14:49 ` Laurent Pinchart
2014-10-08 7:09 ` Thierry Reding
2014-10-10 13:03 ` Ajay kumar
2014-10-16 8:23 ` Ajay kumar
2014-10-16 9:04 ` Laurent Pinchart
2014-10-28 9:12 ` Javier Martinez Canillas
2014-10-28 11:12 ` Ajay kumar
2014-09-22 8:26 ` Thierry Reding
2014-09-22 14:42 ` Tomi Valkeinen
2014-09-23 5:53 ` Thierry Reding
2014-09-23 8:41 ` Tomi Valkeinen
2014-09-23 9:28 ` Thierry Reding
2014-09-23 11:15 ` Tomi Valkeinen
2014-09-23 14:29 ` Thierry Reding
2014-09-23 15:25 ` Tomi Valkeinen
2014-09-22 8:10 ` Thierry Reding
2014-09-22 8:31 ` Ajay kumar
2014-09-22 10:41 ` Thierry Reding
2014-09-22 11:23 ` Ajay kumar
2014-09-22 11:35 ` Thierry Reding
2014-09-22 12:12 ` Ajay kumar
2014-09-23 0:00 ` Laurent Pinchart [this message]
2014-09-23 5:55 ` Thierry Reding
2014-09-23 6:11 ` Ajay kumar
2014-09-23 6:28 ` Thierry Reding
2014-09-23 11:47 ` DT property to selectively disable device features (was [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties) Laurent Pinchart
2014-09-22 8:06 ` [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties Thierry Reding
2014-09-22 14:23 ` Tomi Valkeinen
2014-09-23 6:04 ` Thierry Reding
2014-09-23 7:24 ` Andrzej Hajda
2014-09-23 8:35 ` Thierry Reding
2014-09-23 9:40 ` Tomi Valkeinen
2014-09-23 10:01 ` Thierry Reding
2014-09-23 12:09 ` Tomi Valkeinen
2014-09-23 14:38 ` Thierry Reding
2014-09-23 15:33 ` Tomi Valkeinen
2014-09-23 9:43 ` Andrzej Hajda
2014-09-23 10:10 ` Thierry Reding
2014-09-23 10:34 ` Andrzej Hajda
2014-09-23 14:41 ` Thierry Reding
2014-09-24 7:11 ` Andrzej Hajda
2014-09-24 8:27 ` Tomi Valkeinen
2014-09-23 11:33 ` Laurent Pinchart
2014-09-23 8:54 ` Tomi Valkeinen
2014-09-23 9:39 ` Thierry Reding
2014-09-23 11:31 ` Tomi Valkeinen
2014-09-23 14:45 ` Thierry Reding
2014-09-24 8:42 ` Tomi Valkeinen
2014-10-06 14:40 ` Laurent Pinchart
2014-10-07 7:06 ` Tomi Valkeinen
2014-10-07 7:23 ` Laurent Pinchart
2014-10-07 8:25 ` Tomi Valkeinen
2014-10-07 16:14 ` Laurent Pinchart
2014-09-22 7:54 ` Thierry Reding
2014-09-22 14:04 ` Tomi Valkeinen
2014-09-23 6:21 ` Thierry Reding
2014-09-23 9:30 ` Tomi Valkeinen
2014-09-23 9:53 ` Thierry Reding
2014-09-23 11:12 ` Laurent Pinchart
2014-09-23 14:50 ` Thierry Reding
2014-09-23 12:00 ` Tomi Valkeinen
2014-09-23 14:58 ` Thierry Reding
2014-09-24 9:08 ` Tomi Valkeinen
2014-09-25 6:23 ` Thierry Reding
2014-10-06 11:34 ` Tomi Valkeinen
2014-10-06 13:55 ` Laurent Pinchart
2014-09-23 10:02 ` Andrzej Hajda
2014-09-23 10:02 ` Andrzej Hajda
2014-09-23 11:10 ` Laurent Pinchart
2014-09-23 11:18 ` Andrzej Hajda
2014-09-23 11:23 ` Laurent Pinchart
2014-09-23 11:47 ` Andrzej Hajda
2014-09-23 11:52 ` Laurent Pinchart
2014-09-23 12:40 ` Andrzej Hajda
2014-09-23 12:40 ` Andrzej Hajda
2014-09-23 14:49 ` Thierry Reding
2014-10-06 14:38 ` Laurent Pinchart
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=7550026.qs7FRi8hDC@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=ajaykumar.rs@samsung.com \
--cc=ajaynumb@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=jg1.han@samsung.com \
--cc=joshi@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=prashanth.g@samsung.com \
--cc=robdclark@gmail.com \
--cc=seanpaul@google.com \
--cc=thierry.reding@gmail.com \
--cc=tomi.valkeinen@ti.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;
as well as URLs for NNTP newsgroup(s).