On Fri, Jun 27, 2014 at 07:32:20AM +0200, Johannes Pointner wrote:
> Hello,
> 
> I'm new working on the linux device drivers, so if I made something wrong
> please point me into the right direction.
> 
> I'd like to use the pwm_bl driver for a sitara based terminal and for this
> I would need the possibility to set the backlight within a percentage
> range. The following patch should add this possibility to the pwm_bl
> driver. The idea is to keep backward compatibility by moving the required
> option brightness levels to optional. Therefore if there is no node with
> brightness levels the percentage levels are used.
> 
> Signed-off-by: Johannes Pointner <[email protected]>
> ---
>  .../bindings/video/backlight/
> pwm-backlight.txt     | 11 +++---
>  drivers/video/backlight/pwm_bl.c                   | 46
> ++++++++++++----------
>  2 files changed, 31 insertions(+), 26 deletions(-)

Also adding the backlight maintainers on Cc.

This has been discussed a few times before. In fact the original device
tree binding had support for a continuous range of levels but that was
rejected during review. The reason was, as far as I remember, that the
number of levels and the corresponding duty cycle values is something
that's usually determined at system design time. Often backlights can't
properly light the whole surface of the panel at every level.

That said, there's always the possibility to fake this by adding a DT
property with a continuous range, such as this:

        brightness-levels = <0 1 2 ... 100>;

Thierry

Attachment: pgp7yfxO6wUZ8.pgp
Description: PGP signature

Reply via email to