From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sascha Hauer Subject: Re: [PATCH] pwm-backlight: allow for non-increasing brightness levels Date: Tue, 17 Sep 2013 11:36:22 +0200 Message-ID: <20130917093622.GB30088@pengutronix.de> References: <1379010952-8928-1-git-send-email-mikedunn@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1379010952-8928-1-git-send-email-mikedunn-kFrNdAxtuftBDgjK7y7TUQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mike Dunn Cc: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Richard Purdie , Jingoo Han , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Grant Likely , Rob Herring , linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Robert Jarzmik , Marek Vasut List-Id: devicetree@vger.kernel.org Hi Mike, On Thu, Sep 12, 2013 at 11:35:52AM -0700, Mike Dunn wrote: > Currently the driver assumes that the values specified in the brightness-levels > device tree property increase as they are parsed from left to right. But boards > that invert the signal between the PWM output and the backlight will need to > specify decreasing brightness-levels. This patch removes the assumption that > the last element of the array is the max value, and instead searches the array > for the max value and uses that as the normalizing value when determining the > duty cycle. Note there's also support for inverted PWMs in the PWM framework provided your hardware supports this. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html