public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Jingoo Han <jingoohan1@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Rob Clark <robdclark@gmail.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH] backlight: pm8941-wled: Add default-brightness property
Date: Thu, 30 Jul 2015 09:44:33 -0700	[thread overview]
Message-ID: <20150730164433.GE6519@usrtlx11787.corpusers.net> (raw)
In-Reply-To: <CAL_JsqJYxDROqbv-wh37=MjwbsEtrYKFTvC1NfneonLH2_gL2A@mail.gmail.com>

On Thu 30 Jul 08:26 PDT 2015, Rob Herring wrote:

> On Wed, Jul 29, 2015 at 6:51 PM, Bjorn Andersson
> <bjorn.andersson@sonymobile.com> wrote:
> > On Fri 24 Jul 08:29 PDT 2015, Rob Herring wrote:
[..]
> > As we're trying to specify a default brightness within the range [0,
> > max_brightness) the latter doesn't make much sense.
> >
> > Therefor my suggestion is that we make the "default-brightness" the
> > common property and we define it as a percentage of [0,max_brightness).
> 
> Okay.
> 
> I wonder if we should have units such as
> "default-brightness-percentage" or "default-brightness-%" so it is
> clear. Otherwise, we might have some people doing a range of [0,max].
> The former is a bit long and the latter is a bit unusual.
> 

I discussed this further with my colleague and gave it some though over
the night;

If the boot loader sets the brightness, it would need to convert this to
a percentage just to have the kernel convert it back - with a expected
lack of precision (especially w/ non-linear brightness ranges or odd
step-sizes).

In the case where it's manually tweaked by the developer he/she would
most likely modify the brightness through sysfs until a reasonable value
is found; and we have that extra step again of converting this to a
percentage.


Therefor I think it's better to just specify this in "units of
brightness" - which would be a unit-less property.

Regards,
Bjorn

      reply	other threads:[~2015-07-30 16:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 19:52 [PATCH] backlight: pm8941-wled: Add default-brightness property Bjorn Andersson
2015-07-24  8:22 ` Lee Jones
2015-07-24 13:10 ` Rob Clark
2015-07-24 15:39   ` Rob Herring
2015-07-24 17:41     ` Rob Clark
2015-07-29 22:37       ` Bjorn Andersson
2015-07-24 15:29 ` Rob Herring
2015-07-29 23:51   ` Bjorn Andersson
2015-07-30 15:26     ` Rob Herring
2015-07-30 16:44       ` Bjorn Andersson [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=20150730164433.GE6519@usrtlx11787.corpusers.net \
    --to=bjorn.andersson@sonymobile.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=robherring2@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