From patchwork Fri Nov 25 14:33:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 628739 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 75C51C43219 for ; Fri, 25 Nov 2022 14:33:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229653AbiKYOdo (ORCPT ); Fri, 25 Nov 2022 09:33:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229990AbiKYOdi (ORCPT ); Fri, 25 Nov 2022 09:33:38 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 423532E6B1 for ; Fri, 25 Nov 2022 06:33:37 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id j16so7140347lfe.12 for ; Fri, 25 Nov 2022 06:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VxlrZWPFCrFQp2sHfL4Kx3y4fi4AGKGpCjaVKusjlG8=; b=u7zDvcN/YwdQwwUSi++0dMjhKMK7C+JAG4gCC3LTftZyocaB4/tBX8OuIK8pEBmMWK +R+vLtA2DjkxmMHwu8qJ/iUP1dopSN2EHgs/NmFaa35vOendIogkE2GvTl2BSWVdWqNT 4EwTNrA9FiRrg8kwLJpy6/c1eDtbjMecDgvlFtscL14SHQ0AeTImj6LN2DVdQYavSahG 4NdQT9Fk2DDiySd1HHQ7aURbfutRqz/kmTI0Y3DphBVE1TflCqj6e/zpON8vroqRoCjE b+8s7C6LNM66Y3GwfaqF2S9H7JU02n8BgHgXkFIztErUy7oxtcGcf4AWcJHzo5UJEJCM hPww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VxlrZWPFCrFQp2sHfL4Kx3y4fi4AGKGpCjaVKusjlG8=; b=hElsW9ek4jFC3+rzTqrDdsSBsNDpCkIBEqW5EdFFNG256LGRXRkia9eWvZLxYETRnA mV1e/X2UjHHyjXZm1hI+NMpdLjGpu0YEA51WXD+oucmqxyQ0wOBpExCmecjB6PI3BkcF lCurakAWVc7pTVeosMc2N4uQxRvULHVritCPQlN3nobrCAwtNzDXSVpjlCKYWr6B7vMh gLzDcmqBN4n5mrStBJECE9/L/N0z3ybkndeliQOhbqktzimOHdhrebcVzUz9veaMxcFo VMBrGVhPIjf5csYYwcNeixPgczZyIkqgmmG6x/fkjwAFv979TGPOyCE/Bgti7+Q3MKCU 05hw== X-Gm-Message-State: ANoB5pn+j8sqKSme69WZNXAlDa/ZYpUMEgoNyDJH5JeNpLg3cQ3IdmUg mRJMpL6Gs180ZQYiE9NSTMvi1Q== X-Google-Smtp-Source: AA0mqf4CLFbynW8Xkv7G/S3W3bwEKgJFc7U0ncZcpC6avjkTBUEFmbGof8INlOched8bha1V/SKsXQ== X-Received: by 2002:a05:6512:2989:b0:4b1:753b:e677 with SMTP id du9-20020a056512298900b004b1753be677mr12245606lfb.407.1669386815560; Fri, 25 Nov 2022 06:33:35 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id k26-20020a05651c10ba00b002798ab42fffsm312966ljn.129.2022.11.25.06.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 06:33:35 -0800 (PST) From: Krzysztof Kozlowski To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Vincent Knecht , Nikita Travkin , Jacek Anaszewski , Andrew Davis , Gene Chen , Bjorn Andersson , ChiYuan Huang , Luca Weiss , - NeilBrown , 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 Subject: [PATCH 2/4] dt-bindings: leds: lp55xx: allow label Date: Fri, 25 Nov 2022 15:33:29 +0100 Message-Id: <20221125143331.473981-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221125143331.473981-1-krzysztof.kozlowski@linaro.org> References: <20221125143331.473981-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The Linux driver and at least one upstream board use 'label' property: qcom/msm8996-xiaomi-gemini.dtb: lp5562@30: 'label' does not match any of the regexes: '^led@[0-8]$', '^multi-led@[0-8]$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml index 7ec676e53851..dfaa957eee74 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml @@ -48,6 +48,8 @@ properties: description: | GPIO attached to the chip's enable pin + label: true + pwr-sel: $ref: /schemas/types.yaml#/definitions/uint8 description: | From patchwork Fri Nov 25 14:33:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 628738 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 95059C43219 for ; Fri, 25 Nov 2022 14:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230011AbiKYOdr (ORCPT ); Fri, 25 Nov 2022 09:33:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbiKYOdn (ORCPT ); Fri, 25 Nov 2022 09:33:43 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2CEF30F6B for ; Fri, 25 Nov 2022 06:33:38 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id n1so692043ljg.3 for ; Fri, 25 Nov 2022 06:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8y3a98agTTuTX1jVNEjy44NE9w3cHQ5Lb1+gIhtRkWA=; b=hS5c0+dIHOjIZqq0x2fAc5Qzoj15r81Mw73Pnu8/JJIerGbiPo3MpuJeeS5VxlUsvD p2sjNHNL1sLRn1lHftzKw1JIn27GlIRh+ynJfUEh1A0c7O2LtdrYDA1DyY/88SvmXib0 hkgXuKlGqC7NxEwJMC1g1A2AHkuvefwdyVbSuBpKMuJFXtTiTRQANJHype5IIv9IqQPq Z2hKOKX9RUOCuBpm9DcFG1QcZElpaiTQqrQaX7/8npQRD5CP4T161oNGGutsuxygtwWp Hq5WnZwydHGXdFq37Jb7iRjpz+0AkQuSB8dMUnf8/naXq4M0gNrTDK0rWJgJdP6pTRwk yfSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8y3a98agTTuTX1jVNEjy44NE9w3cHQ5Lb1+gIhtRkWA=; b=VOwE6p02CuJ6RBx2U3l9VslSS3dV2U4oRWD92UFV32I4Cpg4Ewz5fAYtTHSEQULT9r +U21hQYgbYFEIxiCgdaBQxZcoOsn3e3Sz1pTWyIY8FOx78Fsx1MeN1l4zgjFOHcMjc3x 6PkeqIkT4JiWq1kctkRjOXoUiS4SH+bOZeFgiV7nMY4AVjnKp0kRTRvn5lcKKJGOVTFX G2DmHilUVKIyBu54fCsAkTN+sZAmDxP2W/dvr8a41spzb2GxoJ6X7//I92YW5gm/77vX r66pdjoDRzNc+4Bgh0UsDslOlQiNlswKbzWevWrZlyQt5x2HDn0ey76cJ+MVa7zd5Z5g /tFA== X-Gm-Message-State: ANoB5plreubv9Bs90BiMs620DuBAoAI1045BO77d1M6iiHbUfD7gJroS gYIktgbxLj3QlW1TuiNwDin5Dw== X-Google-Smtp-Source: AA0mqf5wzZeyZBpsU1bGgU8eBUDra12IZlK9ZLIMvAYF9zIMTKhgrtoY4kXxrXfa5x6MW42EPVLtKA== X-Received: by 2002:a2e:a26a:0:b0:277:34bb:ea2 with SMTP id k10-20020a2ea26a000000b0027734bb0ea2mr7824151ljm.427.1669386816879; Fri, 25 Nov 2022 06:33:36 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id k26-20020a05651c10ba00b002798ab42fffsm312966ljn.129.2022.11.25.06.33.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 06:33:36 -0800 (PST) From: Krzysztof Kozlowski To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Vincent Knecht , Nikita Travkin , Jacek Anaszewski , Andrew Davis , Gene Chen , Bjorn Andersson , ChiYuan Huang , Luca Weiss , - NeilBrown , 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 Subject: [PATCH 3/4] dt-bindings: leds: lp55xx: rework to match multi-led Date: Fri, 25 Nov 2022 15:33:30 +0100 Message-Id: <20221125143331.473981-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221125143331.473981-1-krzysztof.kozlowski@linaro.org> References: <20221125143331.473981-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.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 --- .../devicetree/bindings/leds/leds-lp55xx.yaml | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml index dfaa957eee74..0018e963f83a 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml @@ -67,9 +67,50 @@ properties: const: 0 patternProperties: - "(^led@[0-9a-f]$|led)": + '^multi-led@[0-8]$': + type: object + $ref: leds-class-multicolor.yaml# + unevaluatedProperties: false + + properties: + reg: + maximum: 8 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + patternProperties: + "^led@[0-8]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + led-cur: + $ref: /schemas/types.yaml#/definitions/uint8 + description: | + Current setting at each LED channel (mA x10, 0 if LED is not connected) + minimum: 0 + maximum: 255 + + max-cur: + $ref: /schemas/types.yaml#/definitions/uint8 + description: Maximun current at each LED channel. + + reg: + maximum: 8 + + required: + - reg + + "^led@[0-8]$": type: object $ref: common.yaml# + unevaluatedProperties: false + properties: led-cur: $ref: /schemas/types.yaml#/definitions/uint8