From patchwork Sun Jun 18 11:45:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Apitzsch?= X-Patchwork-Id: 109612 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2441532vqr; Sun, 18 Jun 2023 05:45:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7rQ/OARYnJYlQdDWLw0ZGkl+af6dB/G7axigKIF44JpkfqgTgJrGs7+6AnST7TgWceWF68 X-Received: by 2002:a05:6a21:1510:b0:114:f112:d8f0 with SMTP id nq16-20020a056a21151000b00114f112d8f0mr6313806pzb.35.1687092325876; Sun, 18 Jun 2023 05:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687092325; cv=none; d=google.com; s=arc-20160816; b=pnuJVDUiucBH2eqzeTvt6rr/wMfJnMVg697GCGpBGJNl2zvNCc+BzzGyzqWyw7ogp4 MFHoIBGWk0wJ1bazNlaSIAjeLYw7YH99OGAem13zBakMn/GI17db2Efqu35s5XVu3bRK GlYBDhc+MKTQ/+2jbhb47os7leWYaX31QALUfRE81pyuEyNsjqdqA42wY45kW8LmdFy6 VdZKsAVWCjtefI4igxP+25vSdagKXpsYZTgVuDetdmCtRx4LWAcl7M/V0nGJjoV7gHr8 fVceVGV/KWMayOHQi9HlGZl/QbbsI2RrCvbMZoFLc/WOFAsY1HFarZOqz/nlBo1Emkuo zGgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=VMsRosfertmIr7nEc4kZLkwyW79KAJBhG2a+d2+HhbA=; b=JFSA9I1HOrImWoGHrjBQ85BQtNY+QilNE1alkgWfie4hputxSnR4bxhtalCyU5zAPL x9OpIIDy6KUtE+lCwtNMfisUBQ0gQ9jFAyTAh+L2P3uNg//s+p/3iu5eqeEizTTIuWQU qJjWxZHHDXuLnyi8lGDb+23mtE/xUimF7Ha5rXiUvC4TwnB8wuofmyKfuK5o7pH0pTfi IaF0qK0KAAiuQUkNWOWcY5P/C5KT0uBa7zYKgJmJ7bXMn3OFn81opd/XlOImRKrhg4HO tO5mDcLrfUNVrDDnpinaK36QBgV0ymPJWIGz6Mp4wZmLnWcWYJgzlVZegdbQVqClsDL+ /jyQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t131-20020a637889000000b0053ef14a4fe8si18078115pgc.446.2023.06.18.05.45.12; Sun, 18 Jun 2023 05:45:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbjFRL6l (ORCPT + 99 others); Sun, 18 Jun 2023 07:58:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbjFRL6e (ORCPT ); Sun, 18 Jun 2023 07:58:34 -0400 Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.18.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87DD8E6E; Sun, 18 Jun 2023 04:58:33 -0700 (PDT) Received: from [92.206.161.29] (helo=note-book.lan) by smtprelay05.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qAqs7-00070T-6I; Sun, 18 Jun 2023 13:47:07 +0200 From: =?utf-8?q?Andr=C3=A9_Apitzsch?= Date: Sun, 18 Jun 2023 13:45:53 +0200 Subject: [PATCH 1/2] dt-bindings: leds: Add Kinetic KTD2026/2027 LED MIME-Version: 1.0 Message-Id: <20230618-ktd202x-v1-1-fc182fefadd7@apitzsch.eu> References: <20230618-ktd202x-v1-0-fc182fefadd7@apitzsch.eu> In-Reply-To: <20230618-ktd202x-v1-0-fc182fefadd7@apitzsch.eu> To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, =?utf-8?q?Andr=C3=A9_Apitzsch?= X-Mailer: b4 0.12.2 X-Df-Sender: YW5kcmVAYXBpdHpzY2guZXU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769044522395554256?= X-GMAIL-MSGID: =?utf-8?q?1769044522395554256?= Document Kinetic KTD2026/2027 LED driver devicetree bindings. Signed-off-by: André Apitzsch --- .../devicetree/bindings/leds/leds-ktd202x.yaml | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/leds-ktd202x.yaml b/Documentation/devicetree/bindings/leds/leds-ktd202x.yaml new file mode 100644 index 000000000000..9868d6f6f147 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-ktd202x.yaml @@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-ktd202x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kinetic KTD2026/7 RGB/White LED Driver + +maintainers: + - André Apitzsch + +description: | + The KTD2026/7 is a RGB/White LED driver with I2C interface. + + The data sheet can be found at: + https://www.kinet-ic.com/uploads/KTD2026-7-04h.pdf + +properties: + compatible: + enum: + - kinetic,ktd2026 + - kinetic,ktd2027 + + reg: + maxItems: 1 + + vin-supply: + description: Regulator providing power to the "VIN" pin. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + multi-led: + type: object + $ref: leds-class-multicolor.yaml# + unevaluatedProperties: false + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^led@[0-3]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + description: Index of the LED. + minimum: 0 + maximum: 3 + + required: + - reg + - color + + required: + - "#address-cells" + - "#size-cells" + +patternProperties: + "^led@[0-3]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + description: Index of the LED. + minimum: 0 + maximum: 3 + + required: + - reg + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@30 { + compatible = "kinetic,ktd2026"; + reg = <0x30>; + #address-cells = <1>; + #size-cells = <0>; + + vin-supply = <&pm8916_l17>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led@1 { + reg = <1>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led@2 { + reg = <2>; + function = LED_FUNCTION_STATUS; + color = ; + }; + }; + }; + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@30 { + compatible = "kinetic,ktd2026"; + reg = <0x30>; + #address-cells = <1>; + #size-cells = <0>; + + vin-supply = <&pm8916_l17>; + + multi-led { + color = ; + function = LED_FUNCTION_STATUS; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + }; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + }; + }; + };