summaryrefslogtreecommitdiffstats
path: root/Documentation/leds
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2022-05-23 16:37:19 -0700
committerPavel Machek <pavel@ucw.cz>2022-05-24 22:08:10 +0200
commite98a860f65428a3cae7ed7b3e8ebcf6320d7fc5e (patch)
treea63712ae933948a5b27eca0daba1f706cbac3c4c /Documentation/leds
parent73bce575ed90c752eaa4b2b9a70860481d58d240 (diff)
downloadlinux-stable-e98a860f65428a3cae7ed7b3e8ebcf6320d7fc5e.tar.gz
linux-stable-e98a860f65428a3cae7ed7b3e8ebcf6320d7fc5e.tar.bz2
linux-stable-e98a860f65428a3cae7ed7b3e8ebcf6320d7fc5e.zip
leds: qcom-lpg: Require pattern to follow documentation
The leds-trigger-pattern documentation describes how the brightness of the LED should transition linearly from one brightness value to the next, over the given delta_t. But the pattern engine in the Qualcomm LPG hardware only supports holding the brightness for each entry for the period. This subset of patterns can be represented in the leds-trigger-pattern by injecting zero-time transitions after each entry in the pattern, resulting in a pattern that pattern that can be rendered by the LPG. Rework LPG pattern interface to require these zero-time transitions, to make it comply with this subset of patterns and reject the patterns it can't render. Fixes: 24e2d05d1b68 ("leds: Add driver for Qualcomm LPG") Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'Documentation/leds')
-rw-r--r--Documentation/leds/leds-qcom-lpg.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Documentation/leds/leds-qcom-lpg.rst b/Documentation/leds/leds-qcom-lpg.rst
index f12416f02dd8..de7ceead9337 100644
--- a/Documentation/leds/leds-qcom-lpg.rst
+++ b/Documentation/leds/leds-qcom-lpg.rst
@@ -35,11 +35,13 @@ Specify a hardware pattern for a Qualcomm LPG LED.
The pattern is a series of brightness and hold-time pairs, with the hold-time
expressed in milliseconds. The hold time is a property of the pattern and must
therefor be identical for each element in the pattern (except for the pauses
-described below).
+described below). As the LPG hardware is not able to perform the linear
+transitions expected by the leds-trigger-pattern format, each entry in the
+pattern must be followed a zero-length entry of the same brightness.
Simple pattern::
- "255 500 0 500"
+ "255 500 255 0 0 500 0 0"
^
|
@@ -54,7 +56,7 @@ in the pattern, the so called "low pause" and "high pause".
Low-pause pattern::
- "255 1000 0 500 255 500 0 500"
+ "255 1000 255 0 0 500 0 0 255 500 255 0 0 500 0 0"
^
|