From patchwork Tue Mar 28 16:15:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 76197 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2354886vqo; Tue, 28 Mar 2023 09:39:16 -0700 (PDT) X-Google-Smtp-Source: AKy350aZ2f92V7tsGEaDVTnhllmL/EkCDORG+ORg+lQJEgBTJ5P+7/yGK68ejfs3XIuVH80nIVFB X-Received: by 2002:a17:906:4888:b0:932:da0d:96ac with SMTP id v8-20020a170906488800b00932da0d96acmr17032153ejq.10.1680021556070; Tue, 28 Mar 2023 09:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680021556; cv=none; d=google.com; s=arc-20160816; b=f54eLthT5AM6RQ/RhP8ugz4qh65hWFuGduBlKYwe0/ILjKJI6mDwLCA8kj84p7avJ5 Hr7z1uDDfv2OEps44ZrGrWBZJobFvPAyI1sUO+GJ8KTRM4Vv8lyqgtkd8JohgxUI9DM3 IEqRGX8zB/AVEmwbRqysn8O73UrJJ61Bw+k62wdRskAVRRreiCvzT3Vr1AITGVTJLR1F K9aFAKV5U78AUDxTU757S78C1jIKxUejFP8at1XO+wY10BMZnSCe2mAWXHtlrRh0zVhk T6eGX+mUYp1XrdRjA3CDsEv00otggCn68IC0dNxHQK+rIuxqR5AyJCK/3C2uKKKoNAOm 9+Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/Ey+jWLzFOuhyp2YVJoMqpRDWRSBJ6wVscx7GRuCPHA=; b=r5EKr3B0jGOvoW1KNST5svrslHd6k7xjCf7ypfSTuLLicDXMRXKY/JCugmHKruPyTZ PpePWzEX73EW2kwNnlZYL74ZEnp2/mVMYxde/PsmXAEl9cTsCI8zsP2fWNBe6dWc7blE f8vFKRLl8uKGX0kCh5QHsnddZYw5VkvwkomxYk2rSw0P9CpxrjeloD3avN+KnrQUO8Dv M6Kpe4DUaBW302D/8XU1NwYQVkQRMfmXPBhx2tPf9S9NC8rHfszxgnytbF9f8//s3CrF IyvkT0CRfXwXyPXqD4HjWSUoGZSg25XKiUZLyyo04Ll0iEhYFwzuhc2Fjf1DleJohVcu YK0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ue6-20020a170907c68600b009321def4b92si20726709ejc.333.2023.03.28.09.38.49; Tue, 28 Mar 2023 09:39:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233203AbjC1QZC (ORCPT + 99 others); Tue, 28 Mar 2023 12:25:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233222AbjC1QYy (ORCPT ); Tue, 28 Mar 2023 12:24:54 -0400 Received: from 10.mo562.mail-out.ovh.net (10.mo562.mail-out.ovh.net [46.105.72.220]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 301C2E39C; Tue, 28 Mar 2023 09:24:51 -0700 (PDT) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 5811423CBB; Tue, 28 Mar 2023 16:15:56 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for ; Tue, 28 Mar 2023 16:15:56 +0000 (UTC) Received: from pro2.mail.ovh.net (unknown [10.108.16.48]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 411ED1FE53; Tue, 28 Mar 2023 16:15:56 +0000 (UTC) Received: from localhost.localdomain (88.161.25.233) by DAG1EX1.emp2.local (172.16.2.1) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 28 Mar 2023 18:15:55 +0200 From: Jean-Jacques Hiblot To: , , , , CC: , , , , , , , Jean-Jacques Hiblot , Rob Herring Subject: [PATCH v8 5/6] dt-bindings: leds: Add binding for a multicolor group of LEDs Date: Tue, 28 Mar 2023 18:15:40 +0200 Message-ID: <20230328161541.599463-6-jjhiblot@traphandler.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230328161541.599463-1-jjhiblot@traphandler.com> References: <20230328161541.599463-1-jjhiblot@traphandler.com> MIME-Version: 1.0 X-Originating-IP: [88.161.25.233] X-ClientProxiedBy: DAG8EX1.emp2.local (172.16.2.81) To DAG1EX1.emp2.local (172.16.2.1) X-Ovh-Tracer-Id: 1349953990446430673 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehgedgleekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfgtihesthekredtredttdenucfhrhhomheplfgvrghnqdflrggtqhhuvghsucfjihgslhhothcuoehjjhhhihgslhhothesthhrrghphhgrnhgulhgvrhdrtghomheqnecuggftrfgrthhtvghrnheptddtffevleejteelieejhfffvedtffeljeehjeeigfejledufedvveejuddtjefhnecuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghenucfkpheptddrtddrtddrtddpkeekrdduiedurddvhedrvdeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepughirhgvtghtohhrgedruggvrhhprdhmrghilhdqohhuthdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepjhhjhhhisghlohhtsehtrhgrphhhrghnughlvghrrdgtohhmpdhnsggprhgtphhtthhopedupdhrtghpthhtoheplhhinhhugidqlhgvughssehvghgvrhdrkhgvrhhnvghlrdhorhhgpdfovfetjfhoshhtpehmohehiedv X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761630282927624722?= X-GMAIL-MSGID: =?utf-8?q?1761630282927624722?= This allows to group multiple monochromatic LEDs into a multicolor LED, e.g. RGB LEDs. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Rob Herring --- .../bindings/leds/leds-group-multicolor.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml new file mode 100644 index 000000000000..8ed059a5a724 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-group-multicolor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Multi-color LED built with monochromatic LEDs + +maintainers: + - Jean-Jacques Hiblot + +description: | + This driver combines several monochromatic LEDs into one multi-color + LED using the multicolor LED class. + +properties: + compatible: + const: leds-group-multicolor + + leds: + description: + An aray of monochromatic leds + $ref: /schemas/types.yaml#/definitions/phandle-array + +required: + - leds + +allOf: + - $ref: leds-class-multicolor.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + monochromatic-leds { + compatible = "gpio-leds"; + + led0: led-0 { + gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>; + color = ; + }; + + led1: led-1 { + gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>; + color = ; + }; + + led2: led-2 { + gpios = <&mcu_pio 2 GPIO_ACTIVE_HIGH>; + color = ; + }; + }; + + multi-led { + compatible = "leds-group-multicolor"; + color = ; + function = LED_FUNCTION_INDICATOR; + leds = <&led0>, <&led1>, <&led2>; + }; + +...