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

TOMOYO Linux Cross Reference
Linux/Documentation/leds/leds-lp5521.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/leds-lp5521.rst (Version linux-6.12-rc7) and /Documentation/leds/leds-lp5521.rst (Version linux-4.4.302)


  1 ========================                          
  2 Kernel driver for lp5521                          
  3 ========================                          
  4                                                   
  5 * National Semiconductor LP5521 led driver chi    
  6 * Datasheet: http://www.national.com/pf/LP/LP5    
  7                                                   
  8 Authors: Mathias Nyman, Yuri Zaporozhets, Samu    
  9                                                   
 10 Contact: Samu Onkalo (samu.p.onkalo-at-nokia.c    
 11                                                   
 12 Description                                       
 13 -----------                                       
 14                                                   
 15 LP5521 can drive up to 3 channels. Leds can be    
 16 the led class control interface. Channels have    
 17 lp5521:channelx, where x is 0 .. 2                
 18                                                   
 19 All three channels can be also controlled usin    
 20 More details of the instructions can be found     
 21                                                   
 22 LP5521 has the internal program memory for run    
 23 There are two ways to run LED patterns.           
 24                                                   
 25 1) Legacy interface - enginex_mode and enginex    
 26    Control interface for the engines:             
 27                                                   
 28    x is 1 .. 3                                    
 29                                                   
 30    enginex_mode:                                  
 31         disabled, load, run                       
 32    enginex_load:                                  
 33         store program (visible only in engine     
 34                                                   
 35   Example (start to blink the channel 2 led)::    
 36                                                   
 37         cd   /sys/class/leds/lp5521:channel2/d    
 38         echo "load" > engine3_mode                
 39         echo "037f4d0003ff6000" > engine3_load    
 40         echo "run" > engine3_mode                 
 41                                                   
 42   To stop the engine::                            
 43                                                   
 44         echo "disabled" > engine3_mode            
 45                                                   
 46 2) Firmware interface - LP55xx common interfac    
 47                                                   
 48 For the details, please refer to 'firmware' se    
 49                                                   
 50 sysfs contains a selftest entry.                  
 51                                                   
 52 The test communicates with the chip and checks    
 53 the clock mode is automatically set to the req    
 54                                                   
 55 Each channel has its own led current settings.    
 56                                                   
 57 - /sys/class/leds/lp5521:channel0/led_current     
 58 - /sys/class/leds/lp5521:channel0/max_current     
 59                                                   
 60 Format: 10x mA i.e 10 means 1.0 mA                
 61                                                   
 62 example platform data::                           
 63                                                   
 64   static struct lp55xx_led_config lp5521_led_c    
 65           {                                       
 66                 .name = "red",                    
 67                   .chan_nr        = 0,            
 68                   .led_current    = 50,           
 69                 .max_current    = 130,            
 70           }, {                                    
 71                 .name = "green",                  
 72                   .chan_nr        = 1,            
 73                   .led_current    = 0,            
 74                 .max_current    = 130,            
 75           }, {                                    
 76                 .name = "blue",                   
 77                   .chan_nr        = 2,            
 78                   .led_current    = 0,            
 79                 .max_current    = 130,            
 80           }                                       
 81   };                                              
 82                                                   
 83   static int lp5521_setup(void)                   
 84   {                                               
 85         /* setup HW resources */                  
 86   }                                               
 87                                                   
 88   static void lp5521_release(void)                
 89   {                                               
 90         /* Release HW resources */                
 91   }                                               
 92                                                   
 93   static void lp5521_enable(bool state)           
 94   {                                               
 95         /* Control of chip enable signal */       
 96   }                                               
 97                                                   
 98   static struct lp55xx_platform_data lp5521_pl    
 99           .led_config     = lp5521_led_config,    
100           .num_channels   = ARRAY_SIZE(lp5521_    
101           .clock_mode     = LP55XX_CLOCK_EXT,     
102           .setup_resources   = lp5521_setup,      
103           .release_resources = lp5521_release,    
104           .enable            = lp5521_enable,     
105   };                                              
106                                                   
107 Note:                                             
108   chan_nr can have values between 0 and 2.        
109   The name of each channel can be configurable    
110   If the name field is not defined, the defaul    
111   (XXXX : pdata->label or i2c client name, N :    
112                                                   
113                                                   
114 If the current is set to 0 in the platform dat    
115 disabled and it is not visible in the sysfs.      
                                                      

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