[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131018074623.GA22291@ulmo.nvidia.com>
Date: Fri, 18 Oct 2013 09:46:24 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Mike Dunn <mikedunn@...sguy.com>
Cc: Richard Purdie <rpurdie@...ys.net>,
Jingoo Han <jg1.han@...sung.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Tomi Valkeinen <tomi.valkeinen@...com>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <rob.herring@...xeda.com>,
linux-pwm@...r.kernel.org, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Marek Vasut <marex@...x.de>
Subject: Re: [PATCH v2] pwm-backlight: allow for non-increasing brightness
levels
On Sun, Sep 22, 2013 at 09:59:56AM -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 maximum value, and instead searches the array for the maximum value
> and uses that in the duty cycle calculation.
>
> Signed-off-by: Mike Dunn <mikedunn@...sguy.com>
> ---
> Changelog:
> v2:
> - commit message reworded; correct line wrap used
> - 'max_level' variable renamed to 'scale'
> - loop counter variable type changed to unsigned int
> - value held in scale changed from array index to actual maximum level
> - blank lines added around loop for readability
>
> drivers/video/backlight/pwm_bl.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
Hey Mike,
I've pushed a slightly different version of this patch which gets rid of
the intermediate max variable and uses the new scale field exclusively
to pass the same information around. Could you look at the patch from my
for-next branch in the PWM tree and see whether that still works for the
specific hardware that you need this for?
Thierry
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists