Re: [PATCH v4 2/3] pwm_backlight: use power sequences
From: Stephen Warren <hidden>
Date: 2012-08-16 18:42:31
Also in:
linux-devicetree, linux-fbdev, lkml
On 08/16/2012 12:08 AM, Alexandre Courbot wrote:
Make use of the power sequences specified in the device tree or platform data to control how the backlight is powered on and off.
quoted hunk ↗ jump to hunk
+++ b/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt
quoted hunk ↗ jump to hunk
Required properties: - compatible: "pwm-backlight" - - pwms: OF device-tree PWM specification (see PWM binding[0]) - 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@@ -10,19 +9,72 @@ Required properties: last value in the array represents a 100% duty cycle (brightest). - default-brightness-level: the default brightness level (index into the array defined by the "brightness-levels" property) + - pwms: OF device-tree PWM specification (see PWM binding[0]). Exactly one PWM + must be specified
There's probably no need to move that entry just to change it?
Optional properties: - - pwm-names: a list of names for the PWM devices specified in the - "pwms" property (see PWM binding[0])
+ - *-supply: regulators used within a power sequence + - *-gpio: GPIOs used within a power sequence
I don't think these really warrant mentioning here; such properties are part of the standard regulator and GPIO bindings, and are required as a side-effect of a power sequence using a resource of those types, rather than being something actively defined or needed directly by the pwm-backlight binding.
+ - pwm-names: name for the PWM device specified in the "pwms" property (see PWM + binding[0]). Necessary if power sequences are used
+ - power-on-sequence: Power sequence (see Power sequences[1]) used to bring the + backlight on. This sequence must reference the PWM specified in the pwms + property by its name. It can also reference other resources supported by + the power sequences mechanism + - power-off-sequence: Power sequence (see Power sequences[1]) used to bring + the backlight off. This sequence must reference the PWM specified in the + pwms property by its name. It can also reference other resources supported + by the power sequences mechanism
For these two, I would personally simply say that the pwm-backlight binding requires that two power sequences named "on" and "off" must exists, and are to defined according to [1].
[0]: Documentation/devicetree/bindings/pwm/pwm.txt +[1]: Documentation/devicetree/bindings/power_seq/power_seq.txt