Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3820215rwo; Mon, 24 Jul 2023 17:53:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlE/ERPDAS6Aa4V5Q+hd8RW/d1HhaXE0nmvm+HtEwcx103/p4L4K3nqAiuBdWIjQBYB22jCJ X-Received: by 2002:a05:6a00:1482:b0:682:5a68:9846 with SMTP id v2-20020a056a00148200b006825a689846mr14373513pfu.16.1690246412653; Mon, 24 Jul 2023 17:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690246412; cv=none; d=google.com; s=arc-20160816; b=UQhol/fub5ALHz1xovOyYIOKy5IK/DMfo/zmygbDHiKmEGR7Vua0RLMLUlN9rokNu1 68ooGqSP/S8mD7Q853ib01GBZ95v4+DnHBjNnv4aXzaV75d9mu8xdXq/MW0I086Yo8yO imKu4M1jKJOzjmBwt/RIO6lQ5UKBGgijAhQHZxxgXgQYWjflirrkdIwL83B5YY1m45uq dSFKU6cKMAOqLDn/m+4dneEjxZF/XlqgizKK/8cTZNuXeHeG8JFWV3SvqtM0bPF0PuoQ HP/ew7jL9qiaslZ7d1mM9+4E1gE3ZjLpXSAQZpbJnCXUXEW4yMGcA/PeFuP+k4uBWxUa 7Cww== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8pvcoZ444/geQBY+Oz3+ItYIFs9Mi6T8yWyyUWmyeaA=; fh=daDAHVzMfHEmBcNtuXsjKUnyM1bEZw/SPwFatcjf6ts=; b=ImaltdMBy+3rLxLROJ4yHV1NF8ShB80LKyVipQ5nG9gfZa1ldd1Q65m3wh693iUBgC E/mTUG3IQAZkBT7BBqMSgjJOFNk8fYzgmktPjmA1BCj3UtdAXx2zGRP5BendEayRG7t7 MvLfPXFuwqKiGeGSZ3UtfyVeENSTpTdvGUfSQwvdAwDmbIaQMlC4IZrSxvcIn/sk6Iq2 WJnO2R0SW4i3rQ545LkTjmPzKvLGzwmjp8kowD/hGOOUx28qjAX8fWKqBIw9xz4DSdnM lYYVPzXMILeNGKrdV2jxz/G6L7TMh20VzCdGDjqdYmgwzbdJgwJpkPV1TX6d6Thwt51F AXjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tP4SLIjx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l23-20020a637017000000b00563377d5cd7si10190298pgc.192.2023.07.24.17.53.20; Mon, 24 Jul 2023 17:53:32 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tP4SLIjx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230291AbjGXXD3 (ORCPT + 99 others); Mon, 24 Jul 2023 19:03:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbjGXXD3 (ORCPT ); Mon, 24 Jul 2023 19:03:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6A85EA; Mon, 24 Jul 2023 16:03:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 60C6D6145A; Mon, 24 Jul 2023 23:03:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAE69C433C7; Mon, 24 Jul 2023 23:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690239806; bh=HdXCBkJC6y8xmaikj3v3JuRSAllSb+fugmrt05+9R+8=; h=From:To:Cc:Subject:Date:From; b=tP4SLIjxJM84HZM8PVsNB6zuSpHeExq9O/E/+5sE5BAPATPnujMXngLls2F16qiL/ +GXpgss+DgrCRuMCQj1kWxFy8kEe3YbgDVd2iTSjbvg6StfMzeZFG5VCt0rtJMV/p1 KFGDE3zJqKs5/EMbmH6TJeU0ZqelZ01e5YD0r83VnWfsJW9240mOJZT8bCJGpiYaXK IV9w5CdCu1sNAZNmsvfndWz9n7C0D53TU7BbMjOKyGi/suyQtkZhKfHj4R8loDD3Wa IMNkPkAO0+grfC4sKzKR1edV4IPe3VnxuwlVAgx1Qr5d4AovDK3CZYWe8pJmOdH4AG Dr5R7vokMWIDg== Received: (nullmailer pid 1018011 invoked by uid 1000); Mon, 24 Jul 2023 23:03:24 -0000 From: Rob Herring To: Pavel Machek , Lee Jones , Krzysztof Kozlowski , Conor Dooley , Iskren Chernev Cc: Krzysztof Kozlowski , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] dt-bindings: leds: Convert Panasonic AN30259A to DT schema Date: Mon, 24 Jul 2023 17:02:58 -0600 Message-Id: <20230724230258.1017258-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Convert the Panasonic AN30259A 3-channel LED controller binding to DT schema format. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring --- v2: - Update maintainer .../bindings/leds/leds-an30259a.txt | 55 ------------ .../bindings/leds/panasonic,an30259a.yaml | 84 +++++++++++++++++++ 2 files changed, 84 insertions(+), 55 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-an30259a.txt create mode 100644 Documentation/devicetree/bindings/leds/panasonic,an30259a.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-an30259a.txt b/Documentation/devicetree/bindings/leds/leds-an30259a.txt deleted file mode 100644 index cbd833906b2b..000000000000 --- a/Documentation/devicetree/bindings/leds/leds-an30259a.txt +++ /dev/null @@ -1,55 +0,0 @@ -* Panasonic AN30259A 3-channel LED driver - -The AN30259A is a LED controller capable of driving three LEDs independently. It supports -constant current output and sloping current output modes. The chip is connected over I2C. - -Required properties: - - compatible: Must be "panasonic,an30259a". - - reg: I2C slave address. - - #address-cells: Must be 1. - - #size-cells: Must be 0. - -Each LED is represented as a sub-node of the panasonic,an30259a node. - -Required sub-node properties: - - reg: Pin that the LED is connected to. Must be 1, 2, or 3. - -Optional sub-node properties: - - function : - see Documentation/devicetree/bindings/leds/common.txt - - color : - see Documentation/devicetree/bindings/leds/common.txt - - label : - see Documentation/devicetree/bindings/leds/common.txt (deprecated) - - linux,default-trigger : - see Documentation/devicetree/bindings/leds/common.txt - -Example: - -#include - -led-controller@30 { - compatible = "panasonic,an30259a"; - reg = <0x30>; - #address-cells = <1>; - #size-cells = <0>; - - led@1 { - reg = <1>; - linux,default-trigger = "heartbeat"; - function = LED_FUNCTION_INDICATOR; - color = ; - }; - - led@2 { - reg = <2>; - function = LED_FUNCTION_INDICATOR; - color = ; - }; - - led@3 { - reg = <3>; - function = LED_FUNCTION_INDICATOR; - color = ; - }; -}; diff --git a/Documentation/devicetree/bindings/leds/panasonic,an30259a.yaml b/Documentation/devicetree/bindings/leds/panasonic,an30259a.yaml new file mode 100644 index 000000000000..e918dceea082 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/panasonic,an30259a.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/panasonic,an30259a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Panasonic AN30259A 3-channel LED controller + +maintainers: + - Iskren Chernev + +description: + The AN30259A is a LED controller capable of driving three LEDs independently. + It supports constant current output and sloping current output modes. The chip + is connected over I2C. + +properties: + compatible: + const: panasonic,an30259a + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[1-3]$": + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + enum: [ 1, 2, 3 ] + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@30 { + compatible = "panasonic,an30259a"; + reg = <0x30>; + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + linux,default-trigger = "heartbeat"; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + + led@2 { + reg = <2>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + + led@3 { + reg = <3>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + }; + }; +... -- 2.40.1