Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752398AbbG3P0l (ORCPT ); Thu, 30 Jul 2015 11:26:41 -0400 Received: from mail-yk0-f170.google.com ([209.85.160.170]:34495 "EHLO mail-yk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbbG3P0j (ORCPT ); Thu, 30 Jul 2015 11:26:39 -0400 MIME-Version: 1.0 In-Reply-To: <20150729235139.GC6519@usrtlx11787.corpusers.net> References: <1437681127-15760-1-git-send-email-bjorn.andersson@sonymobile.com> <20150729235139.GC6519@usrtlx11787.corpusers.net> From: Rob Herring Date: Thu, 30 Jul 2015 10:26:19 -0500 Message-ID: Subject: Re: [PATCH] backlight: pm8941-wled: Add default-brightness property To: Bjorn Andersson 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2565 Lines: 63 On Wed, Jul 29, 2015 at 6:51 PM, Bjorn Andersson wrote: > On Fri 24 Jul 08:29 PDT 2015, Rob Herring wrote: > >> On Thu, Jul 23, 2015 at 2:52 PM, Bjorn Andersson >> wrote: >> > Add the possibility of specifying the default brightness in DT. >> > >> > Signed-off-by: Bjorn Andersson >> > --- >> > >> > This depends on the patch moving pm8941-wled to backlight [1]. The dt property >> > is used by several other backlight drivers, so I considered this to be a >> > "common" property and it's hence not prefixed with "qcom,". >> >> Well, we have "default-brightness" and "default-brightness-level" used >> by 1 driver each. But default-brightness-level is much more commonly >> used (in dts files) since it is in the pwm backlight binding, so we >> should go with it. I'd like to see this moved to a common backlight >> doc. >> > > As I looked at these, the default-brightness used in tps65217 is a value > between 0 and 100, so that can be interpreted as a percentage. > > The pwm binding however uses a separate array of "brightness-levels" and > then default-brightness-level is supposed to be an index into that > array. Uggg. I missed that minor detail... > 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. >> Really, I think all the backlight documentation should be merged with >> LEDs docs. Things like "default-on" are common. But I won't ask to do >> that here. > > I think the backlight framework should be merged with the LED framework. > There's several hw blocks that are split between the two, with an mfd > tying them together... Fully agree. BTW, doing that doesn't have to be in sync between the bindings and drivers. Of course, if we've designed the bindings with sub devices to fit the MFD structure, then that is another problem. Rob -- 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/