panasonic,an30259a.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/leds/panasonic,an30259a.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Panasonic AN30259A 3-channel LED controller
  7. maintainers:
  8. - Iskren Chernev <me@iskren.info>
  9. description:
  10. The AN30259A is a LED controller capable of driving three LEDs independently.
  11. It supports constant current output and sloping current output modes. The chip
  12. is connected over I2C.
  13. properties:
  14. compatible:
  15. const: panasonic,an30259a
  16. reg:
  17. maxItems: 1
  18. interrupts:
  19. maxItems: 1
  20. "#address-cells":
  21. const: 1
  22. "#size-cells":
  23. const: 0
  24. patternProperties:
  25. "^led@[1-3]$":
  26. $ref: common.yaml#
  27. unevaluatedProperties: false
  28. properties:
  29. reg:
  30. enum: [ 1, 2, 3 ]
  31. required:
  32. - compatible
  33. - reg
  34. - "#address-cells"
  35. - "#size-cells"
  36. additionalProperties: false
  37. examples:
  38. - |
  39. #include <dt-bindings/leds/common.h>
  40. i2c {
  41. #address-cells = <1>;
  42. #size-cells = <0>;
  43. led-controller@30 {
  44. compatible = "panasonic,an30259a";
  45. reg = <0x30>;
  46. #address-cells = <1>;
  47. #size-cells = <0>;
  48. led@1 {
  49. reg = <1>;
  50. linux,default-trigger = "heartbeat";
  51. function = LED_FUNCTION_INDICATOR;
  52. color = <LED_COLOR_ID_RED>;
  53. };
  54. led@2 {
  55. reg = <2>;
  56. function = LED_FUNCTION_INDICATOR;
  57. color = <LED_COLOR_ID_GREEN>;
  58. };
  59. led@3 {
  60. reg = <3>;
  61. function = LED_FUNCTION_INDICATOR;
  62. color = <LED_COLOR_ID_BLUE>;
  63. };
  64. };
  65. };
  66. ...