Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753897AbbG3Qom (ORCPT ); Thu, 30 Jul 2015 12:44:42 -0400 Received: from seldrel01.sonyericsson.com ([37.139.156.2]:19179 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751477AbbG3Qoj (ORCPT ); Thu, 30 Jul 2015 12:44:39 -0400 Date: Thu, 30 Jul 2015 09:44:33 -0700 From: Bjorn Andersson To: Rob Herring CC: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Jingoo Han , Lee Jones , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Rob Clark , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , linux-arm-msm Subject: Re: [PATCH] backlight: pm8941-wled: Add default-brightness property Message-ID: <20150730164433.GE6519@usrtlx11787.corpusers.net> References: <1437681127-15760-1-git-send-email-bjorn.andersson@sonymobile.com> <20150729235139.GC6519@usrtlx11787.corpusers.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1655 Lines: 44 On Thu 30 Jul 08:26 PDT 2015, Rob Herring wrote: > On Wed, Jul 29, 2015 at 6:51 PM, Bjorn Andersson > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/