From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com>, Vincent Knecht <vincent.knecht@mailoo.org>, Nikita Travkin <nikitos.tr@gmail.com>, Jacek Anaszewski <jacek.anaszewski@gmail.com>, Andrew Davis <afd@ti.com>, Gene Chen <gene_chen@richtek.com>, Bjorn Andersson <andersson@kernel.org>, ChiYuan Huang <cy_huang@richtek.com>, Luca Weiss <luca@z3ntu.xyz>, Neil Brown <neilb@suse.de>, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH v2 5/6] dt-bindings: leds: mt6360: rework to match multi-led Date: Sun, 27 Nov 2022 21:40:57 +0100 [thread overview] Message-ID: <20221127204058.57111-6-krzysztof.kozlowski@linaro.org> (raw) In-Reply-To: <20221127204058.57111-1-krzysztof.kozlowski@linaro.org> The binding allows two type of LEDs - single and multi-color. They differ with properties, so fix the bindings to accept both cases. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- .../devicetree/bindings/leds/leds-mt6360.yaml | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/leds-mt6360.yaml b/Documentation/devicetree/bindings/leds/leds-mt6360.yaml index 69e579226d9b..d84e28e616d7 100644 --- a/Documentation/devicetree/bindings/leds/leds-mt6360.yaml +++ b/Documentation/devicetree/bindings/leds/leds-mt6360.yaml @@ -26,11 +26,10 @@ properties: const: 0 patternProperties: - "^(multi-)?led@[0-5]$": + "^multi-led@[0-5]$": type: object - $ref: common.yaml# - description: - Properties for a single LED. + $ref: leds-class-multicolor.yaml# + unevaluatedProperties: false properties: reg: @@ -43,6 +42,42 @@ patternProperties: - 4 # LED output FLASH1 - 5 # LED output FLASH2 + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^led@[0-2]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + enum: [0, 1, 2] + + required: + - reg + - color + + required: + - reg + - "#address-cells" + - "#size-cells" + + "^led@[0-5]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + description: + Properties for a single LED. + + properties: + reg: + enum: [0, 1, 2, 3, 4, 5] + required: - compatible - "#address-cells" -- 2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com>, Vincent Knecht <vincent.knecht@mailoo.org>, Nikita Travkin <nikitos.tr@gmail.com>, Jacek Anaszewski <jacek.anaszewski@gmail.com>, Andrew Davis <afd@ti.com>, Gene Chen <gene_chen@richtek.com>, Bjorn Andersson <andersson@kernel.org>, ChiYuan Huang <cy_huang@richtek.com>, Luca Weiss <luca@z3ntu.xyz>, Neil Brown <neilb@suse.de>, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH v2 5/6] dt-bindings: leds: mt6360: rework to match multi-led Date: Sun, 27 Nov 2022 21:40:57 +0100 [thread overview] Message-ID: <20221127204058.57111-6-krzysztof.kozlowski@linaro.org> (raw) In-Reply-To: <20221127204058.57111-1-krzysztof.kozlowski@linaro.org> The binding allows two type of LEDs - single and multi-color. They differ with properties, so fix the bindings to accept both cases. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- .../devicetree/bindings/leds/leds-mt6360.yaml | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/leds-mt6360.yaml b/Documentation/devicetree/bindings/leds/leds-mt6360.yaml index 69e579226d9b..d84e28e616d7 100644 --- a/Documentation/devicetree/bindings/leds/leds-mt6360.yaml +++ b/Documentation/devicetree/bindings/leds/leds-mt6360.yaml @@ -26,11 +26,10 @@ properties: const: 0 patternProperties: - "^(multi-)?led@[0-5]$": + "^multi-led@[0-5]$": type: object - $ref: common.yaml# - description: - Properties for a single LED. + $ref: leds-class-multicolor.yaml# + unevaluatedProperties: false properties: reg: @@ -43,6 +42,42 @@ patternProperties: - 4 # LED output FLASH1 - 5 # LED output FLASH2 + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^led@[0-2]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + enum: [0, 1, 2] + + required: + - reg + - color + + required: + - reg + - "#address-cells" + - "#size-cells" + + "^led@[0-5]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + description: + Properties for a single LED. + + properties: + reg: + enum: [0, 1, 2, 3, 4, 5] + required: - compatible - "#address-cells" -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-11-27 20:41 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-27 20:40 [PATCH v2 0/6] leds: dt-bindings: use unevaluatedProperties:false and few fixes Krzysztof Kozlowski 2022-11-27 20:40 ` Krzysztof Kozlowski 2022-11-27 20:40 ` [PATCH v2 1/6] dt-bindings: leds: use unevaluatedProperties for common.yaml Krzysztof Kozlowski 2022-11-27 20:40 ` Krzysztof Kozlowski 2022-11-27 20:40 ` [PATCH v2 2/6] dt-bindings: leds: lp55xx: allow label Krzysztof Kozlowski 2022-11-27 20:40 ` Krzysztof Kozlowski 2022-11-27 20:40 ` [PATCH v2 3/6] dt-bindings: leds: lp55xx: switch to preferred 'gpios' suffix Krzysztof Kozlowski 2022-11-27 20:40 ` Krzysztof Kozlowski 2022-11-27 20:40 ` [PATCH v2 4/6] dt-bindings: leds: lp55xx: rework to match multi-led Krzysztof Kozlowski 2022-11-27 20:40 ` Krzysztof Kozlowski 2022-11-27 20:40 ` Krzysztof Kozlowski [this message] 2022-11-27 20:40 ` [PATCH v2 5/6] dt-bindings: leds: mt6360: " Krzysztof Kozlowski 2022-11-27 20:40 ` [PATCH v2 6/6] dt-bindings: leds: ti,tca6507: correct Neil's name Krzysztof Kozlowski 2022-11-27 20:40 ` Krzysztof Kozlowski 2022-12-01 22:13 ` Rob Herring 2022-12-01 22:13 ` Rob Herring 2022-12-01 22:20 ` [PATCH v2 0/6] leds: dt-bindings: use unevaluatedProperties:false and few fixes Rob Herring 2022-12-01 22:20 ` Rob Herring
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=20221127204058.57111-6-krzysztof.kozlowski@linaro.org \ --to=krzysztof.kozlowski@linaro.org \ --cc=afd@ti.com \ --cc=andersson@kernel.org \ --cc=cy_huang@richtek.com \ --cc=devicetree@vger.kernel.org \ --cc=gene_chen@richtek.com \ --cc=jacek.anaszewski@gmail.com \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-leds@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=luca@z3ntu.xyz \ --cc=matthias.bgg@gmail.com \ --cc=neilb@suse.de \ --cc=nikitos.tr@gmail.com \ --cc=pavel@ucw.cz \ --cc=robh+dt@kernel.org \ --cc=vincent.knecht@mailoo.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.