lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 30 Jul 2015 09:44:33 -0700
From:	Bjorn Andersson <bjorn.andersson@...ymobile.com>
To:	Rob Herring <robherring2@...il.com>
CC:	Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Jingoo Han <jingoohan1@...il.com>,
	Lee Jones <lee.jones@...aro.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Tomi Valkeinen <tomi.valkeinen@...com>,
	Rob Clark <robdclark@...il.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
	linux-arm-msm <linux-arm-msm@...r.kernel.org>
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@...ymobile.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ