mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 01:26:48 +07:00
b0571e7e4e
The non-DT driver allowed an active low property to be specified, but DT is missing this in its description. Add the property to the DT binding document, making it optional. It defaults to active high, which retains compatibility with existing descriptions. This should only be used for causes where the LED is wired to supply, and the PWM does not sensibly support its own inversion. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Bryan Wu <cooloney@gmail.com>
51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
LED connected to PWM
|
|
|
|
Required properties:
|
|
- compatible : should be "pwm-leds".
|
|
|
|
Each LED is represented as a sub-node of the pwm-leds device. Each
|
|
node's name represents the name of the corresponding LED.
|
|
|
|
LED sub-node properties:
|
|
- pwms : PWM property to point to the PWM device (phandle)/port (id) and to
|
|
specify the period time to be used: <&phandle id period_ns>;
|
|
- pwm-names : (optional) Name to be used by the PWM subsystem for the PWM device
|
|
For the pwms and pwm-names property please refer to:
|
|
Documentation/devicetree/bindings/pwm/pwm.txt
|
|
- max-brightness : Maximum brightness possible for the LED
|
|
- active-low : (optional) For PWMs where the LED is wired to supply
|
|
rather than ground.
|
|
- label : (optional)
|
|
see Documentation/devicetree/bindings/leds/common.txt
|
|
- linux,default-trigger : (optional)
|
|
see Documentation/devicetree/bindings/leds/common.txt
|
|
|
|
Example:
|
|
|
|
twl_pwm: pwm {
|
|
/* provides two PWMs (id 0, 1 for PWM1 and PWM2) */
|
|
compatible = "ti,twl6030-pwm";
|
|
#pwm-cells = <2>;
|
|
};
|
|
|
|
twl_pwmled: pwmled {
|
|
/* provides one PWM (id 0 for Charing indicator LED) */
|
|
compatible = "ti,twl6030-pwmled";
|
|
#pwm-cells = <2>;
|
|
};
|
|
|
|
pwmleds {
|
|
compatible = "pwm-leds";
|
|
kpad {
|
|
label = "omap4::keypad";
|
|
pwms = <&twl_pwm 0 7812500>;
|
|
max-brightness = <127>;
|
|
};
|
|
|
|
charging {
|
|
label = "omap4:green:chrg";
|
|
pwms = <&twl_pwmled 0 7812500>;
|
|
max-brightness = <255>;
|
|
};
|
|
};
|