Hi all,
I have some problems and need your help.
I use the LP3943 chip for LED control in linux3.14.
I need control the individual LED's brightness and blink.
In the Linux Device Tree Document, there are 3 files related to LP3943.
Documentation/devicetree/bindings/mfd/lp3943.txt
Documentation/devicetree/bindings/gpio/gpio-lp3943.txt
Documentation/devicetree/bindings/pwm/pwm-lp3943.txt
After enabling driver support, I refer the example of document for establishing device tree.
i2c_0: i2c@78b7000 { /* BLSP1 QUP2 */ pinctrl-0 = <&i2c_0_pins>; pinctrl-1 = <&i2c_0_pins>; pinctrl-names = "i2c_active", "i2c_sleep"; status = "ok"; lp3943@60 { compatible = "ti,lp3943"; reg = <0x60>; pwm3943: pwm { label = "LED0"; compatible = "ti,lp3943-pwm"; #pwm-cells = <2>; ti,pwm0 = <0 1 2 3 4 5 8 9 10 11>; }; gpioex: gpio { compatible = "ti,lp3943-gpio"; gpio-controller; #gpio-cells = <2>; }; }; }; leds { compatible = "gpio-leds"; indicator1 { label = "LED0"; gpios = <&gpioex 0 GPIO_ACTIVE_LOW>; }; indicator2 { label = "LED1";
gpios = <&gpioex 1 GPIO_ACTIVE_LOW>;
};
indicator3 {
label = "LED2";
gpios = <&gpioex 2 GPIO_ACTIVE_LOW>;
};
};
pwmleds {
compatible = "pwm-leds";
rgb {
label = "PWM";
max-brightness = <255>;
pwms = <&pwm3943 0 10000>;
};
};
And I saw following entries in the /sys/class/leds/
root@OpenWrt:/sys/class/leds# ls PWM
root@OpenWrt:/sys/class/pwm# ls
pwmchip0
Why the gpio-leds devices disappear?
GPIO and PWM of LP3943 can coexist or not?
If I want to control the individual LED's brightness and blink, how should I do?
Have any examples of device tree for LP3943?
Thanks you,
Regards,
Kay