Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6578327rwp; Tue, 18 Jul 2023 02:37:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHj6uFP6SHDSB1+yb6GeIa5YqIbD9fKc/oEosxT6jQqPLC7NUfxEs3iBdXiVmkE5uDx38KG X-Received: by 2002:a17:907:58d:b0:991:b554:e64b with SMTP id vw13-20020a170907058d00b00991b554e64bmr12664790ejb.54.1689673077079; Tue, 18 Jul 2023 02:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689673077; cv=none; d=google.com; s=arc-20160816; b=rj+VH6lVPiXgV78ecGqRHLiL5icePb3xz+Dr1ecKQXVG+SKo9xbO68fnsUfpi6kSpK Kl/3AuyqxPF4t/enHJqnl3XFcwCg1kYraB7MfjJvNe6BWyLeLhE40sdevdb6baK8wm0/ i7s/Z+0Qkz8ZdT2vOmqZhnEM4EvFkCFNoD2wrD1Mcv1whZrQ0ho6J5iz3I3sm0iQnBGW 6oiXstVYbQqCB8VGyV6MmPoz5Yv3xNmhf3wdJ1AtR5/a4Y778rnoZLykqGmu+e4ZlJtJ jcXMHgztPBtgXcfPH1nOTNDhqS8HPufNYQKsSek94Wf3cUwMBt52YF32UKG/cEwINH7z XDCQ== 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=fRnw/c0+/6mvIqjou8P61LOaEZeGYQMoJ4tqrSJp8Lg=; fh=J54VzJjs+XkXKzHgi3S348u+pwBeG3WdfFeIDFZrg08=; b=iAuurE8ijJQdq3GkKB2BXKKzAMDEvTV23HGmi8xQGOBR0LVa0HiQNl4TjUn10v6FW4 /7SI8b8r//gqzfxpFqTRLJGks7rpG0E2TLyhAJDIahnMieP16N1ZV9slh7D/vlhrYSJi dssVvVFt/b6LdGKYXPvcvF5vkU26LZ/BcTwNlHwXYGikluHphdw+9W+bacUGFdYFGHDK vAugr4RqTeKpMkP8LoV40jHnRUu0Vpaoc5wd65S9s5QK0J2Ghmp9GJICfEKj5ve2HAp9 RiG5s6sk2FOinwn0BfIBbt+9TydnbucUkz6jeGxtgttqYe9tolNXB9IJWQ4IDJoTwag7 K61Q== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a170906378a00b00991c8ce54c5si888133ejc.178.2023.07.18.02.37.30; Tue, 18 Jul 2023 02:37:57 -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 S232255AbjGRJZt (ORCPT + 99 others); Tue, 18 Jul 2023 05:25:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232209AbjGRJZo (ORCPT ); Tue, 18 Jul 2023 05:25:44 -0400 Received: from 7.mo562.mail-out.ovh.net (7.mo562.mail-out.ovh.net [46.105.55.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0EE3E69 for ; Tue, 18 Jul 2023 02:25:41 -0700 (PDT) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 691D72301C; Tue, 18 Jul 2023 09:25:40 +0000 (UTC) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net. [127.0.0.1]) by director1.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for ; Tue, 18 Jul 2023 09:25:40 +0000 (UTC) Received: from pro2.mail.ovh.net (unknown [10.109.138.11]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id EF6112011E0; Tue, 18 Jul 2023 09:25:39 +0000 (UTC) Received: from traphandler.com (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.27; Tue, 18 Jul 2023 11:25:39 +0200 From: Jean-Jacques Hiblot To: , , , , CC: , , , Jean-Jacques Hiblot , Rob Herring Subject: [PATCH v11 4/5] dt-bindings: leds: Add binding for a multicolor group of LEDs Date: Tue, 18 Jul 2023 11:25:26 +0200 Message-ID: <20230718092527.37516-5-jjhiblot@traphandler.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230718092527.37516-1-jjhiblot@traphandler.com> References: <20230718092527.37516-1-jjhiblot@traphandler.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [88.161.25.233] X-ClientProxiedBy: DAG1EX1.emp2.local (172.16.2.1) To DAG1EX1.emp2.local (172.16.2.1) X-Ovh-Tracer-Id: 6526841760296155601 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrgeeggddugecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgtghisehtkeertdertddtnecuhfhrohhmpeflvggrnhdqlfgrtghquhgvshcujfhisghlohhtuceojhhjhhhisghlohhtsehtrhgrphhhrghnughlvghrrdgtohhmqeenucggtffrrghtthgvrhhnpedttdffveeljeetleeijefhffevtdffleejheejiefgjeeludefvdevjedutdejhfenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecukfhppedtrddtrddtrddtpdekkedrudeiuddrvdehrddvfeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopeguihhrvggtthhorhdurdguvghrphdrmhgrihhlqdhouhhtrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehjjhhhihgslhhothesthhrrghphhgrnhgulhgvrhdrtghomhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehlihhnuhigqdhlvggushesvhhgvghrrdhkvghrnhgvlhdrohhrghdpoffvtefjohhsthepmhhoheeivd X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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 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>; + }; + +... -- 2.34.1