~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/ABI/testing/sysfs-class-led-trigger-pattern

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/ABI/testing/sysfs-class-led-trigger-pattern (Version linux-6.12-rc7) and /Documentation/ABI/testing/sysfs-class-led-trigger-pattern (Version linux-5.0.21)


  1 What:           /sys/class/leds/<led>/pattern       1 What:           /sys/class/leds/<led>/pattern
  2 Date:           September 2018                      2 Date:           September 2018
  3 KernelVersion:  4.20                                3 KernelVersion:  4.20
  4 Description:                                        4 Description:
  5                 Specify a software pattern for      5                 Specify a software pattern for the LED, that supports altering
  6                 the brightness for the specifi      6                 the brightness for the specified duration with one software
  7                 timer. It can do gradual dimmi      7                 timer. It can do gradual dimming and step change of brightness.
  8                                                     8 
  9                 The pattern is given by a seri      9                 The pattern is given by a series of tuples, of brightness and
 10                 duration (ms).                 !!  10                 duration (ms). The LED is expected to traverse the series and
 11                                                !!  11                 each brightness value for the specified duration. Duration of
 12                 The exact format is described  !!  12                 0 means brightness should immediately change to new value, and
 13                 Documentation/devicetree/bindi !!  13                 writing malformed pattern deactivates any active one.
 14                                                !!  14 
 15 What:           /sys/class/leds/<led>/hr_patte !!  15                 1. For gradual dimming, the dimming interval now is set as 50
 16 Date:           April 2024                     !!  16                 milliseconds. So the tuple with duration less than dimming
 17 Description:                                   !!  17                 interval (50ms) is treated as a step change of brightness,
 18                 Specify a software pattern for !!  18                 i.e. the subsequent brightness will be applied without adding
 19                 the brightness for the specifi !!  19                 intervening dimming intervals.
 20                 timer. It can do gradual dimmi !!  20 
 21                                                !!  21                 The gradual dimming format of the software pattern values should be:
 22                 Unlike the /sys/class/leds/<le !!  22                 "brightness_1 duration_1 brightness_2 duration_2 brightness_3
 23                 a pattern on high-resolution t !!  23                 duration_3 ...". For example:
                                                   >>  24 
                                                   >>  25                 echo 0 1000 255 2000 > pattern
                                                   >>  26 
                                                   >>  27                 It will make the LED go gradually from zero-intensity to max (255)
                                                   >>  28                 intensity in 1000 milliseconds, then back to zero intensity in 2000
                                                   >>  29                 milliseconds:
                                                   >>  30 
                                                   >>  31                 LED brightness
                                                   >>  32                     ^
                                                   >>  33                 255-|       / \            / \            /
                                                   >>  34                     |      /    \         /    \         /
                                                   >>  35                     |     /       \      /       \      /
                                                   >>  36                     |    /          \   /          \   /
                                                   >>  37                   0-|   /             \/             \/
                                                   >>  38                     +---0----1----2----3----4----5----6------------> time (s)
                                                   >>  39 
                                                   >>  40                 2. To make the LED go instantly from one brightness value to another,
                                                   >>  41                 we should use zero-time lengths (the brightness must be same as
                                                   >>  42                 the previous tuple's). So the format should be:
                                                   >>  43                 "brightness_1 duration_1 brightness_1 0 brightness_2 duration_2
                                                   >>  44                 brightness_2 0 ...". For example:
                                                   >>  45 
                                                   >>  46                 echo 0 1000 0 0 255 2000 255 0 > pattern
                                                   >>  47 
                                                   >>  48                 It will make the LED stay off for one second, then stay at max brightness
                                                   >>  49                 for two seconds:
                                                   >>  50 
                                                   >>  51                 LED brightness
                                                   >>  52                     ^
                                                   >>  53                 255-|        +---------+    +---------+
                                                   >>  54                     |        |         |    |         |
                                                   >>  55                     |        |         |    |         |
                                                   >>  56                     |        |         |    |         |
                                                   >>  57                   0-|   -----+         +----+         +----
                                                   >>  58                     +---0----1----2----3----4----5----6------------> time (s)
 24                                                    59 
 25 What:           /sys/class/leds/<led>/hw_patte     60 What:           /sys/class/leds/<led>/hw_pattern
 26 Date:           September 2018                     61 Date:           September 2018
 27 KernelVersion:  4.20                               62 KernelVersion:  4.20
 28 Description:                                       63 Description:
 29                 Specify a hardware pattern for     64                 Specify a hardware pattern for the LED, for LED hardware that
 30                 supports autonomously controll     65                 supports autonomously controlling brightness over time, according
 31                 to some preprogrammed hardware     66                 to some preprogrammed hardware patterns. It deactivates any active
 32                 software pattern.                  67                 software pattern.
 33                                                    68 
 34                 Since different LED hardware c     69                 Since different LED hardware can have different semantics of
 35                 hardware patterns, each driver     70                 hardware patterns, each driver is expected to provide its own
 36                 description for the hardware p !!  71                 description for the hardware patterns in their ABI documentation
 37                 file at Documentation/leds/.   !!  72                 file.
 38                                                    73 
 39 What:           /sys/class/leds/<led>/repeat       74 What:           /sys/class/leds/<led>/repeat
 40 Date:           September 2018                     75 Date:           September 2018
 41 KernelVersion:  4.20                               76 KernelVersion:  4.20
 42 Description:                                       77 Description:
 43                 Specify a pattern repeat numbe     78                 Specify a pattern repeat number. -1 means repeat indefinitely,
 44                 other negative numbers and num     79                 other negative numbers and number 0 are invalid.
 45                                                    80 
 46                 This file will always return t     81                 This file will always return the originally written repeat
 47                 number.                            82                 number.
 48                                                << 
 49                 It should be noticed that some << 
 50                 only support indefinitely patt << 
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php