From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D55C9C4332F for ; Wed, 9 Feb 2022 12:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232100AbiBIMBa (ORCPT ); Wed, 9 Feb 2022 07:01:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232396AbiBIMBI (ORCPT ); Wed, 9 Feb 2022 07:01:08 -0500 X-Greylist: delayed 4200 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 09 Feb 2022 03:54:49 PST Received: from mail.thorsis.com (mail.thorsis.com [92.198.35.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18265DF48F22; Wed, 9 Feb 2022 03:54:49 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id 42B5A1A7A; Wed, 9 Feb 2022 10:17:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.thorsis.com Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TcYIS0UTs6_D; Wed, 9 Feb 2022 10:17:25 +0100 (CET) Received: by mail.thorsis.com (Postfix, from userid 109) id 4830C3578; Wed, 9 Feb 2022 10:17:23 +0100 (CET) Date: Wed, 9 Feb 2022 10:17:06 +0100 From: Alexander Dahl To: sven@svenschwermer.de Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, Sven Schwermer , pavel@ucw.cz, robh+dt@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, post@lespocky.de, andy.shevchenko@gmail.com, robh@kernel.org Subject: Re: [PATCH v6 2/3] dt-bindings: leds: Add multicolor PWM LED bindings Message-ID: Mail-Followup-To: sven@svenschwermer.de, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, Sven Schwermer , pavel@ucw.cz, robh+dt@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, post@lespocky.de, andy.shevchenko@gmail.com, robh@kernel.org References: <20220208191236.660172-1-sven@svenschwermer.de> <20220208191236.660172-2-sven@svenschwermer.de> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220208191236.660172-2-sven@svenschwermer.de> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hello Sven, Am Tue, Feb 08, 2022 at 08:12:35PM +0100 schrieb sven@svenschwermer.de: > From: Sven Schwermer > > This allows to group multiple PWM-connected monochrome LEDs into > multicolor LEDs, e.g. RGB LEDs. > > Signed-off-by: Sven Schwermer > --- > > Notes: > Changes in v6: > * Fix device tree binding schema > > Changes in v5: > * (no changes) > > Changes in v4: > * (no changes) > > Changes in v3: > * Remove multi-led unit name > > .../bindings/leds/leds-pwm-multicolor.yaml | 69 +++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml > > diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml > new file mode 100644 > index 000000000000..f7ce29c8ae63 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml > @@ -0,0 +1,69 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/leds-pwm-multicolor.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Multi-color LEDs connected to PWM > + > +maintainers: > + - Sven Schwermer > + > +description: | > + This driver combines several monochrome PWM LEDs into one multi-color > + LED using the multicolor LED class. > + > +properties: > + compatible: > + const: pwm-leds-multicolor > + multi-led: > + type: object > + patternProperties: > + "^led-[0-9a-z]+$": > + type: object > + $ref: common.yaml# > + properties: > + pwms: > + maxItems: 1 > + pwm-names: true > + color: true > + required: > + - pwms > + - color > + additionalProperties: false > +required: > + - compatible > +allOf: > + - $ref: leds-class-multicolor.yaml# > +additionalProperties: false > + > +examples: > + - | > + #include > + > + rgb-led { I think this should be 'led-controller'. See Documentation/devicetree/bindings/leds/common.yaml for reference. > + compatible = "pwm-leds-multicolor"; > + > + multi-led { > + color = ; > + function = LED_FUNCTION_INDICATOR; > + max-brightness = <65535>; > + > + led-red { > + pwms = <&pwm1 0 1000000>; > + color = ; > + }; > + > + led-green { > + pwms = <&pwm2 0 1000000>; > + color = ; > + }; > + > + led-blue { > + pwms = <&pwm3 0 1000000>; > + color = ; > + }; Not sure if those node names should be more generic like led-0, led-1 etc.? At least the color information is redundant here. This would make it more similar to bindings of other LED drivers. And how is it supposed to be named if you have multiple "multi-led"s, e.g. one on three PWM channels, and another one on three different PWM channels? Greets Alex > + }; > + }; > + > +... > -- > 2.35.1 >