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

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


  1 ========================                            1 ========================
  2 Kernel driver for lp5562                            2 Kernel driver for lp5562
  3 ========================                            3 ========================
  4                                                     4 
  5 * TI LP5562 LED Driver                              5 * TI LP5562 LED Driver
  6                                                     6 
  7 Author: Milo(Woogyom) Kim <milo.kim@ti.com>          7 Author: Milo(Woogyom) Kim <milo.kim@ti.com>
  8                                                     8 
  9 Description                                         9 Description
 10 ===========                                        10 ===========
 11                                                    11 
 12   LP5562 can drive up to 4 channels. R/G/B and     12   LP5562 can drive up to 4 channels. R/G/B and White.
 13   LEDs can be controlled directly via the led      13   LEDs can be controlled directly via the led class control interface.
 14                                                    14 
 15   All four channels can be also controlled usi     15   All four channels can be also controlled using the engine micro programs.
 16   LP5562 has the internal program memory for r     16   LP5562 has the internal program memory for running various LED patterns.
 17   For the details, please refer to 'firmware'      17   For the details, please refer to 'firmware' section in leds-lp55xx.txt
 18                                                    18 
 19 Device attribute                                   19 Device attribute
 20 ================                                   20 ================
 21                                                    21 
 22 engine_mux                                         22 engine_mux
 23   3 Engines are allocated in LP5562, but the n     23   3 Engines are allocated in LP5562, but the number of channel is 4.
 24   Therefore each channel should be mapped to t     24   Therefore each channel should be mapped to the engine number.
 25                                                    25 
 26   Value: RGB or W                                  26   Value: RGB or W
 27                                                    27 
 28   This attribute is used for programming LED d     28   This attribute is used for programming LED data with the firmware interface.
 29   Unlike the LP5521/LP5523/55231, LP5562 has u     29   Unlike the LP5521/LP5523/55231, LP5562 has unique feature for the engine mux,
 30   so additional sysfs is required                  30   so additional sysfs is required
 31                                                    31 
 32   LED Map                                          32   LED Map
 33                                                    33 
 34   ===== === ===============================        34   ===== === ===============================
 35   Red   ... Engine 1 (fixed)                       35   Red   ... Engine 1 (fixed)
 36   Green ... Engine 2 (fixed)                       36   Green ... Engine 2 (fixed)
 37   Blue  ... Engine 3 (fixed)                       37   Blue  ... Engine 3 (fixed)
 38   White ... Engine 1 or 2 or 3 (selective)         38   White ... Engine 1 or 2 or 3 (selective)
 39   ===== === ===============================        39   ===== === ===============================
 40                                                    40 
 41 How to load the program data using engine_mux      41 How to load the program data using engine_mux
 42 =============================================      42 =============================================
 43                                                    43 
 44   Before loading the LP5562 program data, engi     44   Before loading the LP5562 program data, engine_mux should be written between
 45   the engine selection and loading the firmwar     45   the engine selection and loading the firmware.
 46   Engine mux has two different mode, RGB and W     46   Engine mux has two different mode, RGB and W.
 47   RGB is used for loading RGB program data, W      47   RGB is used for loading RGB program data, W is used for W program data.
 48                                                    48 
 49   For example, run blinking green channel patt     49   For example, run blinking green channel pattern::
 50                                                    50 
 51     echo 2 > /sys/bus/i2c/devices/xxxx/select_     51     echo 2 > /sys/bus/i2c/devices/xxxx/select_engine     # 2 is for green channel
 52     echo "RGB" > /sys/bus/i2c/devices/xxxx/eng     52     echo "RGB" > /sys/bus/i2c/devices/xxxx/engine_mux    # engine mux for RGB
 53     echo 1 > /sys/class/firmware/lp5562/loadin     53     echo 1 > /sys/class/firmware/lp5562/loading
 54     echo "4000600040FF6000" > /sys/class/firmw     54     echo "4000600040FF6000" > /sys/class/firmware/lp5562/data
 55     echo 0 > /sys/class/firmware/lp5562/loadin     55     echo 0 > /sys/class/firmware/lp5562/loading
 56     echo 1 > /sys/bus/i2c/devices/xxxx/run_eng     56     echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
 57                                                    57 
 58   To run a blinking white pattern::                58   To run a blinking white pattern::
 59                                                    59 
 60     echo 1 or 2 or 3 > /sys/bus/i2c/devices/xx     60     echo 1 or 2 or 3 > /sys/bus/i2c/devices/xxxx/select_engine
 61     echo "W" > /sys/bus/i2c/devices/xxxx/engin     61     echo "W" > /sys/bus/i2c/devices/xxxx/engine_mux
 62     echo 1 > /sys/class/firmware/lp5562/loadin     62     echo 1 > /sys/class/firmware/lp5562/loading
 63     echo "4000600040FF6000" > /sys/class/firmw     63     echo "4000600040FF6000" > /sys/class/firmware/lp5562/data
 64     echo 0 > /sys/class/firmware/lp5562/loadin     64     echo 0 > /sys/class/firmware/lp5562/loading
 65     echo 1 > /sys/bus/i2c/devices/xxxx/run_eng     65     echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
 66                                                    66 
 67 How to load the predefined patterns                67 How to load the predefined patterns
 68 ===================================                68 ===================================
 69                                                    69 
 70   Please refer to 'leds-lp55xx.txt"                70   Please refer to 'leds-lp55xx.txt"
 71                                                    71 
 72 Setting Current of Each Channel                    72 Setting Current of Each Channel
 73 ===============================                    73 ===============================
 74                                                    74 
 75   Like LP5521 and LP5523/55231, LP5562 provide     75   Like LP5521 and LP5523/55231, LP5562 provides LED current settings.
 76   The 'led_current' and 'max_current' are used     76   The 'led_current' and 'max_current' are used.
 77                                                    77 
 78 Example of Platform data                           78 Example of Platform data
 79 ========================                           79 ========================
 80                                                    80 
 81 ::                                                 81 ::
 82                                                    82 
 83         static struct lp55xx_led_config lp5562     83         static struct lp55xx_led_config lp5562_led_config[] = {
 84                 {                                  84                 {
 85                         .name           = "R",     85                         .name           = "R",
 86                         .chan_nr        = 0,       86                         .chan_nr        = 0,
 87                         .led_current    = 20,      87                         .led_current    = 20,
 88                         .max_current    = 40,      88                         .max_current    = 40,
 89                 },                                 89                 },
 90                 {                                  90                 {
 91                         .name           = "G",     91                         .name           = "G",
 92                         .chan_nr        = 1,       92                         .chan_nr        = 1,
 93                         .led_current    = 20,      93                         .led_current    = 20,
 94                         .max_current    = 40,      94                         .max_current    = 40,
 95                 },                                 95                 },
 96                 {                                  96                 {
 97                         .name           = "B",     97                         .name           = "B",
 98                         .chan_nr        = 2,       98                         .chan_nr        = 2,
 99                         .led_current    = 20,      99                         .led_current    = 20,
100                         .max_current    = 40,     100                         .max_current    = 40,
101                 },                                101                 },
102                 {                                 102                 {
103                         .name           = "W",    103                         .name           = "W",
104                         .chan_nr        = 3,      104                         .chan_nr        = 3,
105                         .led_current    = 20,     105                         .led_current    = 20,
106                         .max_current    = 40,     106                         .max_current    = 40,
107                 },                                107                 },
108         };                                        108         };
109                                                   109 
110         static int lp5562_setup(void)             110         static int lp5562_setup(void)
111         {                                         111         {
112                 /* setup HW resources */          112                 /* setup HW resources */
113         }                                         113         }
114                                                   114 
115         static void lp5562_release(void)          115         static void lp5562_release(void)
116         {                                         116         {
117                 /* Release HW resources */        117                 /* Release HW resources */
118         }                                         118         }
119                                                   119 
120         static void lp5562_enable(bool state)     120         static void lp5562_enable(bool state)
121         {                                         121         {
122                 /* Control of chip enable sign    122                 /* Control of chip enable signal */
123         }                                         123         }
124                                                   124 
125         static struct lp55xx_platform_data lp5    125         static struct lp55xx_platform_data lp5562_platform_data = {
126                 .led_config     = lp5562_led_c    126                 .led_config     = lp5562_led_config,
127                 .num_channels   = ARRAY_SIZE(l    127                 .num_channels   = ARRAY_SIZE(lp5562_led_config),
128                 .setup_resources   = lp5562_se    128                 .setup_resources   = lp5562_setup,
129                 .release_resources = lp5562_re    129                 .release_resources = lp5562_release,
130                 .enable            = lp5562_en    130                 .enable            = lp5562_enable,
131         };                                        131         };
132                                                   132 
133 To configure the platform specific data, lp55x    133 To configure the platform specific data, lp55xx_platform_data structure is used
134                                                   134 
135                                                   135 
136 If the current is set to 0 in the platform dat    136 If the current is set to 0 in the platform data, that channel is
137 disabled and it is not visible in the sysfs.      137 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