public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Yuxi (Yuxi) Wang" <Yuxi.Wang@monolithicpower.com>
To: "pavel@ucw.cz" <pavel@ucw.cz>, "lee@kernel.org" <lee@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	"Yuxi (Yuxi) Wang" <Yuxi.Wang@monolithicpower.com>,
	"wyx137120466@gmail.com" <wyx137120466@gmail.com>,
	"Leal (Long) Li" <Leal.Li@monolithicpower.com>
Subject: [PATCH 2/2] dt-bindings: leds: add mp3326
Date: Wed, 9 Aug 2023 06:39:12 +0000	[thread overview]
Message-ID: <fb09088db71f45169739addbaae770be@monolithicpower.com> (raw)

Add dt-bindings for Monolithic Power System MP3326.

Signed-off-by: Yuxi Wang <Yuxi.Wang@monolithicpower.com>
---
 .../devicetree/bindings/leds/leds-mp3326.yaml | 99 +++++++++++++++++++
 1 file changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-mp3326.yaml

diff --git a/Documentation/devicetree/bindings/leds/leds-mp3326.yaml b/Documentation/devicetree/bindings/leds/leds-mp3326.yaml
new file mode 100644
index 000000000000..3a059340b902
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-mp3326.yaml
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/leds-mp3326.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LED driver for MP3326 from Monolithic Power Systems.
+
+maintainers:
+  - Yuxi Wang <Yuxi.Wang@monolithicpower.com>
+
+description: |
+  Bindings for the Monolithic Power Systems MP3326 LED Drivers.
+
+  For more product information please see the link below:
+    https://www.monolithicpower.com/en/products/mp3326.html
+properties:
+  compatible:
+    const: MPS,MP3326
+
+  reg:
+    description: I2C slave address of the controller.
+    maxItems: 1
+
+  led-protect:
+    description: LED short protection threshold.
+    enum:
+      - 0 #2V
+      - 1 #3V
+      - 2 #4V
+      - 3 #5V
+
+  switch_status:
+    description: Master switch for all channels.
+    enum:
+      - 0 #close all channels
+      - 1 #open all channels
+
+patternProperties:
+  "^rgb(-[0-9a-f]+)?$":
+    description: RGB group.
+    type: object
+    unevaluatedProperties: false
+    properties:
+      rgb_r:
+        description: Red light of the RGB group.
+        maxItems: 16
+        minItems: 1
+      rgb_g:
+        description: Green light of the RGB group.
+        maxItems: 16
+        minItems: 1
+      rgb_b:
+        description: Blue light of the RGB group.
+        maxItems: 16
+        minItems: 1
+      brightness:
+        description: Brightness of the RGB group.
+        maxItems: 63
+        minItems: 0
+      required:
+        - rgb_r
+        - rgb_g
+        - rgb_b
+        - brightness
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+    MP3326@30 {
+        compatible = "mps,MP3326";
+        reg = <0x30>;
+        led-protect =<3>;
+        switch_status=<1>;
+
+        /*RGB group 1*/
+        rgb1@0{
+            rgb_r=<1>;
+            rgb_g=<2>;
+            rgb_b=<3>;
+            brightness=<30>;
+        };
+
+        /*RGB group 2*/
+        rgb2@1{
+            rgb_r=<7>;
+            rgb_g=<8>;
+            rgb_b=<9>;
+            brightness=<30>;
+        };
+    };
+
+
+...
-- 
2.25.1


             reply	other threads:[~2023-08-09  6:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09  6:39 Yuxi (Yuxi) Wang [this message]
2023-08-09 18:34 ` [PATCH 2/2] dt-bindings: leds: add mp3326 Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb09088db71f45169739addbaae770be@monolithicpower.com \
    --to=yuxi.wang@monolithicpower.com \
    --cc=Leal.Li@monolithicpower.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=wyx137120466@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox