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

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/leds/leds-gpio.yaml

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/devicetree/bindings/leds/leds-gpio.yaml (Architecture ppc) and /Documentation/devicetree/bindings/leds/leds-gpio.yaml (Architecture sparc64)


  1 # SPDX-License-Identifier: GPL-2.0-only             1 # SPDX-License-Identifier: GPL-2.0-only
  2 %YAML 1.2                                           2 %YAML 1.2
  3 ---                                                 3 ---
  4 $id: http://devicetree.org/schemas/leds/leds-g      4 $id: http://devicetree.org/schemas/leds/leds-gpio.yaml#
  5 $schema: http://devicetree.org/meta-schemas/co      5 $schema: http://devicetree.org/meta-schemas/core.yaml#
  6                                                     6 
  7 title: LEDs connected to GPIO lines                 7 title: LEDs connected to GPIO lines
  8                                                     8 
  9 maintainers:                                        9 maintainers:
 10   - Jacek Anaszewski <jacek.anaszewski@gmail.co     10   - Jacek Anaszewski <jacek.anaszewski@gmail.com>
 11   - Pavel Machek <pavel@ucw.cz>                     11   - Pavel Machek <pavel@ucw.cz>
 12                                                    12 
 13 description:                                       13 description:
 14   Each LED is represented as a sub-node of the     14   Each LED is represented as a sub-node of the gpio-leds device.  Each
 15   node's name represents the name of the corre     15   node's name represents the name of the corresponding LED.
 16                                                    16 
 17 properties:                                        17 properties:
 18   compatible:                                      18   compatible:
 19     const: gpio-leds                               19     const: gpio-leds
 20                                                    20 
 21 patternProperties:                                 21 patternProperties:
 22   # The first form is preferred, but fall back     22   # The first form is preferred, but fall back to just 'led' anywhere in the
 23   # node name to at least catch some child nod     23   # node name to at least catch some child nodes.
 24   "(^led-[0-9a-f]$|led)":                          24   "(^led-[0-9a-f]$|led)":
 25     type: object                                   25     type: object
 26     $ref: common.yaml#                             26     $ref: common.yaml#
 27     unevaluatedProperties: false                   27     unevaluatedProperties: false
 28                                                    28 
 29     properties:                                    29     properties:
 30       gpios:                                       30       gpios:
 31         maxItems: 1                                31         maxItems: 1
 32                                                    32 
 33       retain-state-suspended:                      33       retain-state-suspended:
 34         description:                               34         description:
 35           The suspend state can be retained.Su     35           The suspend state can be retained.Such as charge-led gpio.
 36         type: boolean                              36         type: boolean
 37                                                    37 
 38       retain-state-shutdown:                       38       retain-state-shutdown:
 39         description:                               39         description:
 40           Retain the state of the LED on shutd     40           Retain the state of the LED on shutdown. Useful in BMC systems, for
 41           example when the BMC is rebooted whi     41           example when the BMC is rebooted while the host remains up.
 42         type: boolean                              42         type: boolean
 43                                                    43 
 44     required:                                      44     required:
 45       - gpios                                      45       - gpios
 46                                                    46 
 47 additionalProperties: false                        47 additionalProperties: false
 48                                                    48 
 49 examples:                                          49 examples:
 50   - |                                              50   - |
 51                                                    51 
 52     #include <dt-bindings/gpio/gpio.h>             52     #include <dt-bindings/gpio/gpio.h>
 53     #include <dt-bindings/leds/common.h>           53     #include <dt-bindings/leds/common.h>
 54                                                    54 
 55     leds {                                         55     leds {
 56         compatible = "gpio-leds";                  56         compatible = "gpio-leds";
 57         led-0 {                                    57         led-0 {
 58             gpios = <&mcu_pio 0 GPIO_ACTIVE_LO     58             gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
 59             linux,default-trigger = "disk-acti     59             linux,default-trigger = "disk-activity";
 60             function = LED_FUNCTION_DISK;          60             function = LED_FUNCTION_DISK;
 61         };                                         61         };
 62                                                    62 
 63         led-1 {                                    63         led-1 {
 64             gpios = <&mcu_pio 1 GPIO_ACTIVE_HI     64             gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
 65             /* Keep LED on if BIOS detected ha     65             /* Keep LED on if BIOS detected hardware fault */
 66             default-state = "keep";                66             default-state = "keep";
 67             function = LED_FUNCTION_FAULT;         67             function = LED_FUNCTION_FAULT;
 68         };                                         68         };
 69     };                                             69     };
 70                                                    70 
 71     run-control {                                  71     run-control {
 72         compatible = "gpio-leds";                  72         compatible = "gpio-leds";
 73         led-0 {                                    73         led-0 {
 74             gpios = <&mpc8572 6 GPIO_ACTIVE_HI     74             gpios = <&mpc8572 6 GPIO_ACTIVE_HIGH>;
 75             color = <LED_COLOR_ID_RED>;            75             color = <LED_COLOR_ID_RED>;
 76             default-state = "off";                 76             default-state = "off";
 77         };                                         77         };
 78         led-1 {                                    78         led-1 {
 79             gpios = <&mpc8572 7 GPIO_ACTIVE_HI     79             gpios = <&mpc8572 7 GPIO_ACTIVE_HIGH>;
 80             color = <LED_COLOR_ID_GREEN>;          80             color = <LED_COLOR_ID_GREEN>;
 81             default-state = "on";                  81             default-state = "on";
 82         };                                         82         };
 83     };                                             83     };
 84                                                    84 
 85 ...                                                85 ...
                                                      

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