Messages in this thread | | | Date | Thu, 30 Jul 2015 09:44:33 -0700 | From | Bjorn Andersson <> | Subject | Re: [PATCH] backlight: pm8941-wled: Add default-brightness property |
| |
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
| |