All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
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, 07 Jun 2016 08:02:18 +0000	[thread overview]
Message-ID: <57567F8A.10603@ti.com> (raw)
In-Reply-To: <20160607084907.14ffdc03@ipc1.ka-ro>


[-- Attachment #1.1: Type: text/plain, Size: 1367 bytes --]

On 07/06/16 09:49, Lothar Waßmann wrote:
> 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.

That's a question to the PWM/backlight maintainers, but I think in the
addition of your patch, the binding doc needs to be changed, as it
doesn't hold true after your patch.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
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 11:02:18 +0300	[thread overview]
Message-ID: <57567F8A.10603@ti.com> (raw)
In-Reply-To: <20160607084907.14ffdc03@ipc1.ka-ro>


[-- Attachment #1.1: Type: text/plain, Size: 1367 bytes --]

On 07/06/16 09:49, Lothar Waßmann wrote:
> 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.

That's a question to the PWM/backlight maintainers, but I think in the
addition of your patch, the binding doc needs to be changed, as it
doesn't hold true after your patch.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
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 11:02:18 +0300	[thread overview]
Message-ID: <57567F8A.10603@ti.com> (raw)
In-Reply-To: <20160607084907.14ffdc03@ipc1.ka-ro>


[-- Attachment #1.1: Type: text/plain, Size: 1367 bytes --]

On 07/06/16 09:49, Lothar Waßmann wrote:
> 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.

That's a question to the PWM/backlight maintainers, but I think in the
addition of your patch, the binding doc needs to be changed, as it
doesn't hold true after your patch.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-06-07  8:02 UTC|newest]

Thread overview: 10+ 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 10:44 ` Lothar Waßmann
2016-06-06 12:02 ` Tomi Valkeinen
2016-06-06 12:02   ` Tomi Valkeinen
2016-06-07  6:49   ` Lothar Waßmann
2016-06-07  6:49     ` Lothar Waßmann
2016-06-07  6:49     ` Lothar Waßmann
2016-06-07  8:02     ` Tomi Valkeinen [this message]
2016-06-07  8:02       ` Tomi Valkeinen
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=57567F8A.10603@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.