Re: [PATCHv2] backlight: pwm_bl: disable PWM when 'duty_cycle' is zero
From: Rob Herring <robh@kernel.org>
Date: 2016-06-08 20:06:48
Also in:
linux-fbdev, linux-pwm, lkml
From: Rob Herring <robh@kernel.org>
Date: 2016-06-08 20:06:48
Also in:
linux-fbdev, linux-pwm, lkml
On Tue, Jun 07, 2016 at 12:13:49PM +0200, Lothar Waßmann wrote:
'brightness' is usually an index into a table of duty_cycle values, where the value at index 0 may well be non-zero (tegra30-apalis-eval.dts and tegra30-colibri-eval-v3.dts are real-life examples). Thus brightness == 0 does not necessarily mean that the PWM output will be inactive. Check for 'duty_cycle == 0' rather than 'brightness == 0' to decide whether to disable the PWM. Signed-off-by: Lothar Waßmann <redacted> --- Changes wrt. v1: - update binding docs to reflect the change .../devicetree/bindings/leds/backlight/pwm-backlight.txt | 9 ++++++--- drivers/video/backlight/pwm_bl.c | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-)
Acked-by: Rob Herring <robh@kernel.org>