linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Jingoo Han <jingoohan1@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	<linux-fbdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-pwm@vger.kernel.org>
Subject: Re: [PATCH] backlight: pwm_bl: disable PWM when 'duty_cycle' is zero
Date: Tue, 7 Jun 2016 08:49:07 +0200	[thread overview]
Message-ID: <20160607084907.14ffdc03@ipc1.ka-ro> (raw)
In-Reply-To: <5755664D.5070109@ti.com>

Hi,

On Mon, 6 Jun 2016 15:02:21 +0300 Tomi Valkeinen wrote:
> Hi,
> 
> On 06/06/16 13:44, 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.
> 
> The binding doc does say:
> 
>   - 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).
> 
So, what should I do, when I need a range of levels that doesn't start
at 0? E.g. if the brightness is inverse proportional to the PWM duty
cycle.



Lothar Waßmann

  reply	other threads:[~2016-06-07  6:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 10:44 [PATCH] backlight: pwm_bl: disable PWM when 'duty_cycle' is zero Lothar Waßmann
2016-06-06 12:02 ` Tomi Valkeinen
2016-06-07  6:49   ` Lothar Waßmann [this message]
2016-06-07  8:02     ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160607084907.14ffdc03@ipc1.ka-ro \
    --to=lw@karo-electronics.de \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).