From patchwork Tue Jun 7 07:52:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 579686 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 05C5BC43334 for ; Tue, 7 Jun 2022 07:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235955AbiFGHwy (ORCPT ); Tue, 7 Jun 2022 03:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237942AbiFGHwx (ORCPT ); Tue, 7 Jun 2022 03:52:53 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5CE153B46 for ; Tue, 7 Jun 2022 00:52:51 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id n28so21843519edb.9 for ; Tue, 07 Jun 2022 00:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yz4IPbK/kjVXg2rtjKYX6ym7AFg337BC4YZaEJPRg3Y=; b=bErztxGS/sxqn/5MaEwtqSQKYl8etJxog1lP0bLx9F0yUteWXBG9NAmUfIQ0ynbJHT VeKqty9tWhHfRadz+G6Evu9yJpAiWHuvRPRY67jnsz/bD6lBhNmXVEo2/Buoo5qC9igU unmL5Twzz1YAIy74Wv4rWJCoGtDB9Jm3dtIzLDaISLt0gHWaKgnCqq6yB+D4z8p7KbCX d1xz3Knx31qe9F3lcupa+N4o/p/drV6u7zwjsAAKbYCjnI+5vyz6mh4rTZy343xVBEgK IlaZpcUvtlIJC6xEem+unWPYq9qcGRvdzBo2SvryeJaTVQ5AqtRcCjdmdbF6+rJiPIT9 U9CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yz4IPbK/kjVXg2rtjKYX6ym7AFg337BC4YZaEJPRg3Y=; b=WO7QupUJNUOKYxjRYe9SfRjMqjUIEjNrXnM4XF9C2MUUwscx67vKz2kgJRySguySeL MSVzbWABg9Z2fNJapdjWw7qbYJvzsX1n2ZMecaGNt2D/DU4o+vhbXrH6b3r9SRULK8sX 3qNDLHFwtpo61P+TLIgORbYQFs8XE2Nvc6gwWgMMWdrFKwirHi1+LftY62qfmAkyBI9o aPC8YeKjmk3FMARjQGLdDXyjBbIUlRhxYtnK2voEuRs/BxStFgJlVmxdjKO2iCuXdtIE DvWR5vXIkSOcTAb0gSO94QBPXzD/zurvpQAs0JyQjj8GX8fDxJ/beOpL2zBct//ovFs/ 6oLw== X-Gm-Message-State: AOAM531thawgJCbzj5FJC3bCvTjrOa3aReM32YiOzJU1aKgWZOKX+RCi kR8exPrZfKEjq8asMwfjCCrrag== X-Google-Smtp-Source: ABdhPJwkIeZfv38b59Ycb+if+OhPKhwi1qS4LboQmLNqhsMhCChDXB232li5lfdubeuGAHOgNuqsow== X-Received: by 2002:a05:6402:2790:b0:431:4bb6:a6dc with SMTP id b16-20020a056402279000b004314bb6a6dcmr13559114ede.48.1654588370353; Tue, 07 Jun 2022 00:52:50 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id m3-20020aa7c483000000b0042de29d8fc0sm9773731edq.94.2022.06.07.00.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 00:52:49 -0700 (PDT) From: Krzysztof Kozlowski To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Dan Murphy , Jacek Anaszewski , Sven Schwermer , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Rob Herring , Kyle Swenson Subject: [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Date: Tue, 7 Jun 2022 09:52:46 +0200 Message-Id: <20220607075247.58048-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The multi-led node defined address/size cells, so it is intended to have children with unit addresses. The second multi-led's reg property defined three LED indexes within one reg item, which is not correct - these are three separate items. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- Changes since v2: 1. Minor grammar change in commit msg. 2. Add Rb tag. Changes since v1: 1. Correct multi-led unit address as well (Rob). Cc: Kyle Swenson --- .../devicetree/bindings/leds/leds-lp50xx.yaml | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml index f12fe5b53f30..29ce0cb7d449 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml +++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml @@ -99,35 +99,41 @@ examples: color = ; function = LED_FUNCTION_CHARGING; - led-0 { + led@0 { + reg = <0x0>; color = ; }; - led-1 { + led@1 { + reg = <0x1>; color = ; }; - led-2 { + led@2 { + reg = <0x2>; color = ; }; }; - multi-led@2 { + multi-led@3 { #address-cells = <1>; - #size-cells = <2>; - reg = <0x2 0x3 0x5>; + #size-cells = <0>; + reg = <0x3>, <0x4>, <0x5>; color = ; function = LED_FUNCTION_STANDBY; - led-6 { + led@3 { + reg = <0x3>; color = ; }; - led-7 { + led@4 { + reg = <0x4>; color = ; }; - led-8 { + led@5 { + reg = <0x5>; color = ; }; }; From patchwork Tue Jun 7 07:52:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 580091 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 97552C43334 for ; Tue, 7 Jun 2022 07:53:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237948AbiFGHxC (ORCPT ); Tue, 7 Jun 2022 03:53:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237914AbiFGHxB (ORCPT ); Tue, 7 Jun 2022 03:53:01 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D2BD48308 for ; Tue, 7 Jun 2022 00:52:53 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id fu3so31985950ejc.7 for ; Tue, 07 Jun 2022 00:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aprS9X8nJPy56dhP+0+YmHZ8qAW2AqStnDlxa+L0eRs=; b=NeMKZrOwFgGtjfg+GbeUTesQ0NUlmx4r273/BmHlsGArm5hT6ZEhO9zITU9pz8Mac8 xt9PyavMJkGJHm3tDOp2VZH0GtqlubH5i3Yx8+yToakQU52wO+EdEkSwbE4QpQ/tFFVx 9OJxcTAHd4+J3l1OpBv1h8cTLYNcjtAPqMbG2VTvbQYlizO5kN4y4LOQ80tffkhX0cBC UBrEETR1UQ0DPdjoKd6l2FtJdgkkrTKXWfdEZYI2nJjcWCn3J2nIpQACvQsIYnEYOIkq SSuB9DovSNETJwICs6UJRBtAKREwcYdtRG0mQ0HDrtr1Sbdo6YCefbmXLVl4Ac6j+ssE +0cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aprS9X8nJPy56dhP+0+YmHZ8qAW2AqStnDlxa+L0eRs=; b=Ul1x5SSdzHSq+7LZJkHQWDeWR+QLZetn7lL01F3EaYYscMzadm3kW5G1nGFvUSvl4+ iiGEDD7PZ5197ykh2juIYctPKiJn7z4NyZdxDit7Y7d3xJaO1jRKw7qe5XcslHF01LdT PmZMTlnwWtD7HYOdoRVy7kjep9VZ+ZgpKag5qetRiiSPRCjbEdYzCZV871Jehz27WaTp 4/ijhA0lVg81HdNmskPSxrXq8vUVioaJwO767cwyJ53JXj/6nEzqWc7hNw6nC6IbRu/J jjyRlervsxl/oFtPubaazy3QgfdkjZu9dzC1HmJZ+pQbqe+KdAdxDgLbcZgQvCi3O5kA 49EA== X-Gm-Message-State: AOAM533WRJbr2I81reaUN50I1ZvjNbC5amUVeANitO6gd/mQjOCT3vPt OQARcCzQktgs3gsSFRy3DiZo+Q== X-Google-Smtp-Source: ABdhPJwNBamchoIXF5CsgvWHC6hVe7DDhlLGk8xj0EHpCzIT5LgAR/pBGaGJamPEzPWvYKMYvG/tQQ== X-Received: by 2002:a17:907:94c1:b0:6ff:7dc9:ac22 with SMTP id dn1-20020a17090794c100b006ff7dc9ac22mr25028515ejc.768.1654588371498; Tue, 07 Jun 2022 00:52:51 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id m3-20020aa7c483000000b0042de29d8fc0sm9773731edq.94.2022.06.07.00.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 00:52:51 -0700 (PDT) From: Krzysztof Kozlowski To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Dan Murphy , Jacek Anaszewski , Sven Schwermer , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Rob Herring , Kyle Swenson Subject: [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples Date: Tue, 7 Jun 2022 09:52:47 +0200 Message-Id: <20220607075247.58048-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220607075247.58048-1-krzysztof.kozlowski@linaro.org> References: <20220607075247.58048-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The examples were mixing 4-space with 2- and 3-space indentations, so correct them to use 4-space one. No functional change. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- Changes since v2: 1. Add Rb tag. Changes since v1: 1. None Cc: Kyle Swenson --- .../devicetree/bindings/leds/leds-lp50xx.yaml | 110 ++++----- .../devicetree/bindings/leds/leds-lp55xx.yaml | 222 +++++++++--------- .../bindings/leds/leds-pwm-multicolor.yaml | 36 +-- 3 files changed, 184 insertions(+), 184 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml index 29ce0cb7d449..d11898567313 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml +++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml @@ -78,66 +78,66 @@ additionalProperties: false examples: - | - #include - #include - - i2c { - #address-cells = <1>; - #size-cells = <0>; - - led-controller@14 { - compatible = "ti,lp5009"; - reg = <0x14>; - #address-cells = <1>; - #size-cells = <0>; - enable-gpios = <&gpio1 16>; - - multi-led@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x1>; - color = ; - function = LED_FUNCTION_CHARGING; - - led@0 { - reg = <0x0>; - color = ; - }; - - led@1 { - reg = <0x1>; - color = ; - }; - - led@2 { - reg = <0x2>; - color = ; - }; - }; - - multi-led@3 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x3>, <0x4>, <0x5>; - color = ; - function = LED_FUNCTION_STANDBY; + #include + #include - led@3 { - reg = <0x3>; - color = ; - }; + i2c { + #address-cells = <1>; + #size-cells = <0>; - led@4 { - reg = <0x4>; - color = ; + led-controller@14 { + compatible = "ti,lp5009"; + reg = <0x14>; + #address-cells = <1>; + #size-cells = <0>; + enable-gpios = <&gpio1 16>; + + multi-led@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x1>; + color = ; + function = LED_FUNCTION_CHARGING; + + led@0 { + reg = <0x0>; + color = ; + }; + + led@1 { + reg = <0x1>; + color = ; + }; + + led@2 { + reg = <0x2>; + color = ; + }; }; - led@5 { - reg = <0x5>; - color = ; + multi-led@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x3>, <0x4>, <0x5>; + color = ; + function = LED_FUNCTION_STANDBY; + + led@3 { + reg = <0x3>; + color = ; + }; + + led@4 { + reg = <0x4>; + color = ; + }; + + led@5 { + reg = <0x5>; + color = ; + }; }; - }; - }; + }; }; ... diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml index f552cd143d5b..7ec676e53851 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml @@ -108,119 +108,119 @@ additionalProperties: false examples: - | - #include - - i2c { - #address-cells = <1>; - #size-cells = <0>; - - led-controller@32 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "ti,lp8501"; - reg = <0x32>; - clock-mode = /bits/ 8 <2>; - pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ - - led@0 { - reg = <0>; - chan-name = "d1"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; - - led@1 { - reg = <1>; - chan-name = "d2"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; - - led@2 { - reg = <2>; - chan-name = "d3"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; - - led@3 { - reg = <3>; - chan-name = "d4"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; - - led@4 { - reg = <4>; - chan-name = "d5"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; - - led@5 { - reg = <5>; - chan-name = "d6"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; - - led@6 { - reg = <6>; - chan-name = "d7"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; - - led@7 { - reg = <7>; - chan-name = "d8"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; - - led@8 { - reg = <8>; - chan-name = "d9"; - led-cur = /bits/ 8 <0x14>; - max-cur = /bits/ 8 <0x20>; - }; + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@32 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lp8501"; + reg = <0x32>; + clock-mode = /bits/ 8 <2>; + pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ + + led@0 { + reg = <0>; + chan-name = "d1"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; + + led@1 { + reg = <1>; + chan-name = "d2"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; + + led@2 { + reg = <2>; + chan-name = "d3"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; + + led@3 { + reg = <3>; + chan-name = "d4"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; + + led@4 { + reg = <4>; + chan-name = "d5"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; + + led@5 { + reg = <5>; + chan-name = "d6"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; + + led@6 { + reg = <6>; + chan-name = "d7"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; + + led@7 { + reg = <7>; + chan-name = "d8"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; + + led@8 { + reg = <8>; + chan-name = "d9"; + led-cur = /bits/ 8 <0x14>; + max-cur = /bits/ 8 <0x20>; + }; }; - led-controller@33 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "national,lp5523"; - reg = <0x33>; - clock-mode = /bits/ 8 <0>; - - multi-led@2 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x2>; - color = ; - function = LED_FUNCTION_STANDBY; - linux,default-trigger = "heartbeat"; - - led@0 { - led-cur = /bits/ 8 <50>; - max-cur = /bits/ 8 <100>; - reg = <0x0>; - color = ; - }; - - led@1 { - led-cur = /bits/ 8 <50>; - max-cur = /bits/ 8 <100>; - reg = <0x1>; - color = ; - }; - - led@6 { - led-cur = /bits/ 8 <50>; - max-cur = /bits/ 8 <100>; - reg = <0x6>; - color = ; - }; + led-controller@33 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "national,lp5523"; + reg = <0x33>; + clock-mode = /bits/ 8 <0>; + + multi-led@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x2>; + color = ; + function = LED_FUNCTION_STANDBY; + linux,default-trigger = "heartbeat"; + + led@0 { + led-cur = /bits/ 8 <50>; + max-cur = /bits/ 8 <100>; + reg = <0x0>; + color = ; + }; + + led@1 { + led-cur = /bits/ 8 <50>; + max-cur = /bits/ 8 <100>; + reg = <0x1>; + color = ; + }; + + led@6 { + led-cur = /bits/ 8 <50>; + max-cur = /bits/ 8 <100>; + reg = <0x6>; + color = ; + }; }; }; }; diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml index 6625a528f727..fdaf04e03a8d 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml @@ -55,24 +55,24 @@ examples: 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 = ; - }; + 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 = ; + }; }; };