All of lore.kernel.org
 help / color / mirror / Atom feed
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv7][ 2/2] video: backlight: gpio-backlight: Add DT support.
Date: Fri, 6 Dec 2013 15:12:37 +0100	[thread overview]
Message-ID: <20131206141236.GA32313@ulmo.nvidia.com> (raw)
In-Reply-To: <1386335318.12471946@f258.i.mail.ru>

On Fri, Dec 06, 2013 at 05:08:38PM +0400, Alexander Shiyan wrote:
> > On Thu, Dec 05, 2013 at 06:55:09PM +0100, Denis Carikli wrote:
> > [...]
> > > +Optional properties:
> > > +  - default-state: The initial state of the backlight.
> > > +    Valid values are "on", "off", and "keep".
> > > +    The "keep" setting will keep the backlight at whatever its current
> > > +    state is, without producing a glitch. The default is keep if this
> > > +    property is not present.
> > 
> > I'm not sure if "on", "off" and "keep" are a good choice for this
> > binding. Having strings for these tristate values seems suboptimal.
> > Other bindings have chosen a representation that, transposed to this
> > use-case, would read something like this:
> > 
> > 	- default-state: The initial state of the backlight. Valid
> > 	  values:
> > 	  - 0: off
> > 	  - 1: on
> > 
> > 	If the "default-state" property is not present, the default
> > 	will be to keep the current backlight state.
> > 
> > Which is in fact the exact behaviour that your binding describes, but
> > it's much more intuitive in my opinion.
> 
> Why we cannot use GPIO bindings for active level here?
> What a reason for "keep" state? Can this be an additional property?

Default state and active level are two different things.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131206/6b4b0460/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>
Cc: "Denis Carikli" <denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
	"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Ian Campbell"
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	"Eric Bénard" <eric-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
	"Pawel Moll" <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	"Stephen Warren"
	<swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	"Jingoo Han" <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"Rob Herring"
	<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	"Richard Purdie"
	<rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>,
	"Laurent Pinchart"
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	"Sascha Hauer" <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	"Jean-Christophe Plagniol-Villard"
	<plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	"Lothar Waßmann"
	<LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
Subject: Re: [PATCHv7][ 2/2] video: backlight: gpio-backlight: Add DT support.
Date: Fri, 6 Dec 2013 15:12:37 +0100	[thread overview]
Message-ID: <20131206141236.GA32313@ulmo.nvidia.com> (raw)
In-Reply-To: <1386335318.12471946-q5D3CJL46AJsdVUOrk1QfQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]

On Fri, Dec 06, 2013 at 05:08:38PM +0400, Alexander Shiyan wrote:
> > On Thu, Dec 05, 2013 at 06:55:09PM +0100, Denis Carikli wrote:
> > [...]
> > > +Optional properties:
> > > +  - default-state: The initial state of the backlight.
> > > +    Valid values are "on", "off", and "keep".
> > > +    The "keep" setting will keep the backlight at whatever its current
> > > +    state is, without producing a glitch. The default is keep if this
> > > +    property is not present.
> > 
> > I'm not sure if "on", "off" and "keep" are a good choice for this
> > binding. Having strings for these tristate values seems suboptimal.
> > Other bindings have chosen a representation that, transposed to this
> > use-case, would read something like this:
> > 
> > 	- default-state: The initial state of the backlight. Valid
> > 	  values:
> > 	  - 0: off
> > 	  - 1: on
> > 
> > 	If the "default-state" property is not present, the default
> > 	will be to keep the current backlight state.
> > 
> > Which is in fact the exact behaviour that your binding describes, but
> > it's much more intuitive in my opinion.
> 
> Why we cannot use GPIO bindings for active level here?
> What a reason for "keep" state? Can this be an additional property?

Default state and active level are two different things.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-12-06 14:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05 17:55 [PATCHv7][ 1/2] backlight: gpio_backlight: Use a default state enum Denis Carikli
2013-12-05 17:55 ` Denis Carikli
2013-12-05 17:55 ` [PATCHv7][ 2/2] video: backlight: gpio-backlight: Add DT support Denis Carikli
2013-12-05 17:55   ` Denis Carikli
2013-12-06 13:00   ` Thierry Reding
2013-12-06 13:00     ` Thierry Reding
2013-12-06 13:08     ` Alexander Shiyan
2013-12-06 13:08       ` Alexander Shiyan
2013-12-06 14:12       ` Thierry Reding [this message]
2013-12-06 14:12         ` Thierry Reding
2013-12-06 14:48         ` Alexander Shiyan
2013-12-06 14:48           ` Alexander Shiyan

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=20131206141236.GA32313@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.