regulator-led.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/leds/regulator-led.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Regulator LEDs
  7. maintainers:
  8. - Linus Walleij <linusw@kernel.org>
  9. description: |
  10. Regulator LEDs are powered by a single regulator such that they can
  11. be turned on or off by enabling or disabling the regulator. The available
  12. brightness settings will be inferred from the available voltages on the
  13. regulator, and any constraints on the voltage or current will need to be
  14. specified on the regulator.
  15. allOf:
  16. - $ref: common.yaml#
  17. properties:
  18. $nodename:
  19. pattern: '^led.*$'
  20. compatible:
  21. const: regulator-led
  22. vled-supply:
  23. description:
  24. The regulator controlling the current to the LED.
  25. function: true
  26. color: true
  27. linux,default-trigger: true
  28. default-state: true
  29. required:
  30. - compatible
  31. - vled-supply
  32. additionalProperties: false
  33. examples:
  34. - |
  35. #include <dt-bindings/leds/common.h>
  36. led-heartbeat {
  37. compatible = "regulator-led";
  38. vled-supply = <&regulator>;
  39. function = LED_FUNCTION_STATUS;
  40. color = <LED_COLOR_ID_BLUE>;
  41. linux,default-trigger = "heartbeat";
  42. };
  43. ...