From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH v5 15/16] pwm-backlight: Add rudimentary device tree support Date: Fri, 30 Mar 2012 13:04:28 -0600 Message-ID: <4F7603BC.2050300@wwwdotorg.org> References: <1332945238-14897-1-git-send-email-thierry.reding@avionic-design.de> <1332945238-14897-16-git-send-email-thierry.reding@avionic-design.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1332945238-14897-16-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thierry Reding Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sascha Hauer , Arnd Bergmann , Matthias Kaehlcke , Kurt Van Dijck , Rob Herring , Grant Likely , Colin Cross , Olof Johansson , Richard Purdie , Mark Brown , Mitch Bradley , Mike Frysinger , Eric Miao , Lars-Peter Clausen , Ryan Mallon , Shawn Guo , Bernhard Walle List-Id: devicetree@vger.kernel.org On 03/28/2012 08:33 AM, Thierry Reding wrote: > This commit adds very basic support for device tree probing. Currently, > only a PWM and a list of distinct brightness levels can be specified. > Enabling or disabling backlight power via GPIOs is not yet supported. > > Signed-off-by: Thierry Reding > diff --git a/Documentation/devicetree/bindings/video/backlight/pwm-backlight b/Documentation/devicetree/bindings/video/backlight/pwm-backlight > +Required properties: > + - compatible: "pwm-backlight" > + - pwms: OF device-tree PWM specification (see PWM binding[0]) > + - num-brightness-levels: number of distinct brightness levels Do we need the "num-brightness-levels" property at all; it's just the length of the brightness-levels property. > + - brightness-levels: Array of distinct brightness levels. Typically these > + are in the range from 0 to 255, but any range starting at 0 will do. > + The actual brightness level (PWM duty cycle) will be interpolated > + from these values. 0 means a 0% duty cycle (darkest/off), while the > + last value in the array represents a 100% duty cycle (brightest). ...> +Example: > + > + backlight { > + compatible = "pwm-backlight"; > + pwms = <&pwm 0 5000000>; > + > + num-brightness-levels = <8>; > + brightness-levels = <0 4 8 16 32 64 128 255>; > + default-brightness-level = <6>; > + };