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

TOMOYO Linux Cross Reference
Linux/Documentation/leds/ledtrig-transient.rst

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/leds/ledtrig-transient.rst (Version linux-6.12-rc7) and /Documentation/leds/ledtrig-transient.rst (Version linux-4.18.20)


  1 =====================                             
  2 LED Transient Trigger                             
  3 =====================                             
  4                                                   
  5 The leds timer trigger does not currently have    
  6 a one shot timer. The current support allows f    
  7 specifying how long a state to be on, and the     
  8 to be off. The delay_on value specifies the ti    
  9 in on state, followed by a delay_off value tha    
 10 should stay in off state. The on and off cycle    
 11 gets deactivated. There is no provision for on    
 12 features that require an on or off state to be    
 13 the original state forever.                       
 14                                                   
 15 Without one shot timer interface, user space c    
 16 set a timer to hold a state, however when user    
 17 goes away without deactivating the timer, the     
 18 state permanently.                                
 19                                                   
 20 Transient trigger addresses the need for one s    
 21 transient trigger can be enabled and disabled     
 22 triggers.                                         
 23                                                   
 24 When an led class device driver registers itse    
 25 triggers it supports and a default trigger. Du    
 26 routine for the default trigger gets called. D    
 27 class device, the LED state does not change.      
 28                                                   
 29 When the driver unregisters, deactivation rout    
 30 trigger will be called, and LED state is chang    
 31                                                   
 32 Driver suspend changes the LED state to LED_OF    
 33 the state. Please note that there is no explic    
 34 suspend and resume actions and the currently e    
 35 changes are suspended while the driver is in s    
 36 that are active at the time driver gets suspen    
 37 being able to actually change the LED state. O    
 38 start functioning again.                          
 39                                                   
 40 LED state changes are controlled using brightn    
 41 class device property. When brightness is set     
 42 echo 0 > brightness, it will result in deactiv    
 43                                                   
 44 Transient trigger uses standard register and u    
 45 trigger registration, for each led class devic    
 46 as its default trigger, trigger activation rou    
 47 registration, the LED state does not change, u    
 48 active, in which case LED state changes to LED    
 49                                                   
 50 During trigger unregistration, LED state gets     
 51                                                   
 52 Transient trigger activation routine doesn't c    
 53 creates its properties and does its initializa    
 54 deactivation routine, will cancel any timer th    
 55 up and removes the properties it created. It w    
 56 non-transient state. When driver gets suspende    
 57 state, the LED state changes to LED_OFF.          
 58                                                   
 59 Transient trigger can be enabled and disabled     
 60 devices, that support this trigger as shown be    
 61                                                   
 62         echo transient > trigger                  
 63         echo none > trigger                       
 64                                                   
 65 NOTE:                                             
 66         Add a new property trigger state to co    
 67                                                   
 68 This trigger exports three properties, activat    
 69 transient trigger is activated these propertie    
 70                                                   
 71 - duration allows setting timer value in msecs    
 72 - activate allows activating and deactivating     
 73   duration as needed. The initial and default     
 74   duration to be set after trigger activation.    
 75 - state allows user to specify a transient sta    
 76   duration.                                       
 77                                                   
 78         activate                                  
 79               - one shot timer activate mechan    
 80                 1 when activated, 0 when deact    
 81                 default value is zero when tra    
 82                 to allow duration to be set.      
 83                                                   
 84                 activate state indicates a tim    
 85                 duration running.                 
 86                 deactivated state indicates th    
 87                 running.                          
 88                                                   
 89         duration                                  
 90               - one shot timer value. When act    
 91                 is used to start a timer that     
 92                 get changed by the trigger unl    
 93                 echo new_value > duration         
 94                                                   
 95         state                                     
 96               - transient state to be held. It    
 97                 to LED_OFF and 1 maps to LED_F    
 98                 held for the duration of the o    
 99                 state gets changed to the non-    
100                 inverse of transient state.       
101                 If state = LED_FULL, when the     
102                 go back to LED_OFF.               
103                 If state = LED_OFF, when the t    
104                 go back to LED_FULL.              
105                 Please note that current LED s    
106                 changing the state to the spec    
107                 Driver could map these values     
108                 default states it defines for     
109                 interface which is called from    
110                 interfaces to control the LED     
111                                                   
112 When timer expires activate goes back to deact    
113 at the set value to be used when activate is s    
114 allow user app to set the time once and activa    
115 specified value as needed. When timer expires,    
116 non-transient state which is the inverse of th    
117                                                   
118         =================   ==================    
119         echo 1 > activate   starts timer = dur    
120         echo 0 > activate   cancels currently     
121         echo n > duration   stores timer value    
122                             activate. Currentl    
123                             any, continues to     
124         echo 0 > duration   stores timer value    
125                             activate. Currentl    
126                             continues to run f    
127         echo 1 > state      stores desired tra    
128                             held for the speci    
129         echo 0 > state      stores desired tra    
130                             held for the speci    
131         =================   ==================    
132                                                   
133 What is not supported                             
134 =====================                             
135                                                   
136 - Timer activation is one shot and extending a    
137   is not supported.                               
138                                                   
139 Examples                                          
140 ========                                          
141                                                   
142 use-case 1::                                      
143                                                   
144         echo transient > trigger                  
145         echo n > duration                         
146         echo 1 > state                            
147                                                   
148 repeat the following step as needed::             
149                                                   
150         echo 1 > activate - start timer = dura    
151         echo 1 > activate - start timer = dura    
152         echo none > trigger                       
153                                                   
154 This trigger is intended to be used for the fo    
155                                                   
156  - Use of LED by user space app as activity in    
157  - Use of LED by user space app as a kind of w    
158    long as the app is alive, it can keep the L    
159    the LED will be extinguished automatically.    
160  - Use by any user space app that needs a tran    
                                                      

~ [ 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