[PATCHv3 0/2] Driver for TI tlc59116 16 Channel i2c LED driver

Andrew Lunn andrew at lunn.ch
Fri Jan 16 11:10:44 PST 2015


> I understand that period of TLC chip cannot be changed and hence cannot
> fully implement PWM interface.

O.K, so that is agreed.

> But, suppose I want to control brightness
> of an LCD screen, with your current design, my LCD driver can never can do
> something like:
> 	pwm_get(chip);
> 	pwm_update_brightness();
> 	pwm_remove();
> I will always have to rely on sysfs entries to control brightness.

Or you can use the kernel API for controlling leds. There is a hint in

Documentation/devicetree/bindings/leds/common.txt

- linux,default-trigger :  This parameter, if present, is a
    string defining the trigger assigned to the LED.  Current triggers are:
     "backlight" - LED will act as a back-light, controlled by the framebuffer
                   system

So somebody has at least thought about this, and there is

drivers/leds/trigger/ledtrig-backlight.c

What i also find interesting is:

drivers/video/backlight/adp8860_bl.c
drivers/video/backlight/adp8870_bl.c
drivers/video/backlight/lm3639_bl.c

all implement an led_class driver. So it does seem some people think
backlight LEDs can be models using the led class.

	  Andrew



More information about the linux-arm-kernel mailing list