The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/leds/leds-gpio.yaml

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

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

Cache object: befa2355a1184511f14e57c13c0b9775


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.