Documentation/devicetree/bindings/leds/common.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/leds/common.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/leds/common.yaml
Extension
.yaml
Size
11246 bytes
Lines
324
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Common leds properties

maintainers:
  - Jacek Anaszewski <jacek.anaszewski@gmail.com>
  - Pavel Machek <pavel@ucw.cz>

description:
  LED and flash LED devices provide the same basic functionality as current
  regulators, but extended with LED and flash LED specific features like
  blinking patterns, flash timeout, flash faults and external flash strobe mode.

  Many LED devices expose more than one current output that can be connected
  to one or more discrete LED component. Since the arrangement of connections
  can influence the way of the LED device initialization, the LED components
  have to be tightly coupled with the LED device binding. They are represented
  by child nodes of the parent LED device binding.

properties:
  led-sources:
    description:
      List of device current outputs the LED is connected to. The outputs are
      identified by the numbers that must be defined in the LED device binding
      documentation.
    $ref: /schemas/types.yaml#/definitions/uint32-array

  function:
    description:
      LED function. Use one of the LED_FUNCTION_* prefixed definitions
      from the header include/dt-bindings/leds/common.h. If there is no
      matching LED_FUNCTION available, add a new one.
    $ref: /schemas/types.yaml#/definitions/string

  color:
    description:
      Color of the LED. Use one of the LED_COLOR_ID_* prefixed definitions from
      the header include/dt-bindings/leds/common.h. If there is no matching
      LED_COLOR_ID available, add a new one.
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 14

  function-enumerator:
    description:
      Integer to be used when more than one instance of the same function is
      needed, differing only with an ordinal number.
    $ref: /schemas/types.yaml#/definitions/uint32

  label:
    description:
      The label for this LED. If omitted, the label is taken from the node name
      (excluding the unit address). It has to uniquely identify a device, i.e.
      no other LED class device can be assigned the same label. This property is
      deprecated - use 'function' and 'color' properties instead.
      function-enumerator has no effect when this property is present.

  default-state:
    description:
      The initial state of the LED. If the LED is already on or off and the
      default-state property is set to the same value, then no glitch should be
      produced where the LED momentarily turns off (or on). The "keep" setting
      will keep the LED at whatever its current state is, without producing a
      glitch.
    $ref: /schemas/types.yaml#/definitions/string
    enum:

Annotation

Implementation Notes