Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp322223pxh; Tue, 9 Nov 2021 11:16:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRvu2v8vMw/Y7DjbB0dahvw6V3mrCbOzBt9fz0i42kZzWaOvWSHksz38oxb+KLgwJbNlC8 X-Received: by 2002:a17:906:43c8:: with SMTP id j8mr10957449ejn.117.1636485372991; Tue, 09 Nov 2021 11:16:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636485372; cv=none; d=google.com; s=arc-20160816; b=I8SrAd5uNHyNlQ12siHWw7ul/wsDF1ZGad0CoQ6kCpiCABZ4HO8rUjNLTbFtm1SZ1p rvjDOYMliScbH2ltRS34Hua8JkKpC2U+UMzypaT2/3FfRD/8YZiV78N3iTi2kgfov3NK SBX/CIJQDC2t2+o0YvgghTobfTsgV2kdsd6L8iR6I6eBeXl4Xn2UDzn/jJDR1aoLgpIQ mtk+U7dEBiGRXdED5qH9B8Ek+hnM/EWJm1ZZ8tbLcJruVWS+7XfRSqQenJm6zqCe0J8J H6UXy3XXMvwblKPXSBQhKmuGGTDTGygW6q5jvMoIuIqO92MhhC/goEPdb7KEjmgPLanY D6Pg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vxu23Tn0Q0JBer3KYo7aG6YCWz45Q31YFF3kwDNQhsI=; b=Mhgzno9XdRoviVXsdL9zoIIUZ0OD3FMpxQvHM9taaQuQuowG8hcnQpGBEDFtaz5B90 M2fzmd+BAdk5BFmWN2h2OjqWgUOmHs4HVhtLRPWsDcEPLaGf//lOPeODJbCg584sHlRx xob9Ad2TlChBYw6ombH8cFLE48I5OKY7z+W3pa1ssDX/nW5Js8dM83Q1W4jEbqoxSjFR A46eFnRe6WftsmvO4ueoKDRc0aVWtm2CR3zUYzY9XAdsxOgoaUu76cJj2fJZgUBwBaWN pR7Ea+++nEdV6KOQF4hhNlqCY6306a7ua5P7kBVwZik+55sxc+WPKalWlYG1nUaEx2Vb Ww2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si39032436edc.346.2021.11.09.11.15.48; Tue, 09 Nov 2021 11:16:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245220AbhKIKTm (ORCPT + 99 others); Tue, 9 Nov 2021 05:19:42 -0500 Received: from mxout70.expurgate.net ([91.198.224.70]:40610 "EHLO mxout70.expurgate.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243712AbhKIKTl (ORCPT ); Tue, 9 Nov 2021 05:19:41 -0500 X-Greylist: delayed 483 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Nov 2021 05:19:39 EST Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1mkO3b-000V8U-Ox; Tue, 09 Nov 2021 11:08:47 +0100 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkO3b-000Wh9-3L; Tue, 09 Nov 2021 11:08:47 +0100 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id 65E08240041; Tue, 9 Nov 2021 11:08:46 +0100 (CET) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id E6B26240040; Tue, 9 Nov 2021 11:08:45 +0100 (CET) Received: from localhost.localdomain (unknown [10.2.3.40]) by mail.dev.tdt.de (Postfix) with ESMTPSA id 6AF6220176; Tue, 9 Nov 2021 11:08:45 +0100 (CET) From: Florian Eckert To: pavel@ucw.cz, robh+dt@kernel.org, Eckert.Florian@googlemail.com Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Florian Eckert Subject: [PATCH 2/2] dt: bindings: KTD20xx: Introduce the ktd20xx family of RGB drivers Date: Tue, 9 Nov 2021 11:08:22 +0100 Message-ID: <20211109100822.5412-3-fe@dev.tdt.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211109100822.5412-1-fe@dev.tdt.de> References: <20211109100822.5412-1-fe@dev.tdt.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED, URIBL_DBL_BLOCKED_OPENDNS,URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dev.tdt.de Content-Transfer-Encoding: quoted-printable X-purgate-ID: 151534::1636452527-0000527C-A2DA08EA/0/0 X-purgate-type: clean X-purgate: clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce the bindings for the Kinetic KTD2061/58/59/60RGB LED device driver. The KTD20xx can control RGB LEDs individually or as part of a control bank group. Signed-off-by: Florian Eckert --- .../bindings/leds/leds-ktd20xx.yaml | 123 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 124 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-ktd20xx.y= aml diff --git a/Documentation/devicetree/bindings/leds/leds-ktd20xx.yaml b/D= ocumentation/devicetree/bindings/leds/leds-ktd20xx.yaml new file mode 100644 index 000000000000..b10b5fd507db --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-ktd20xx.yaml @@ -0,0 +1,123 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-ktd20xx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LED driver for KTD20xx RGB LED from Kinetic. + +maintainers: + - Florian Eckert + +description: | + The KTD20XX is multi-channel, I2C RGB LED Drivers that can group RGB L= EDs into + a LED group or control them individually. + + The difference in these RGB LED drivers is I2C address number the devi= ce is + listen on. + +properties: + compatible: + enum: + - kinetic,ktd20xx + + reg: + maxItems: 1 + description: + I2C slave address + ktd2061/58/59/60 0x68 0x69 0x6A 0x6B + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + 'kinetic,color-current0': + description: + Specifies the current selection for the RGB color0. + Value 1 must be the current value for the color red. + Value 2 must be the current value for the color green. + Value 3 must be the current value for the color blue. + The current setting range is from 0mA to 24mA with 125uA steps. + $ref: /schemas/types.yaml#/definitions/uint8-array + items: + - minItems: 3 + - maxItems: 3 + + 'kinetic,color-current1': + description: + Specifies the current selection for the RGB color0. + Value 1 must be the current value for the color red. + Value 2 must be the current value for the color green. + Value 3 must be the current value for the color blue. + The current setting range is from 0mA to 24mA with 125uA steps. + $ref: /schemas/types.yaml#/definitions/uint8-array + items: + - minItems: 3 + - maxItems: 3 + +patternProperties: + '^multi-led@[0-9a-f]$': + type: object + allOf: + - $ref: leds-class-multicolor.yaml# + properties: + reg: + minItems: 1 + maxItems: 12 + description: + This property denotes the LED module number(s) that is used on= the + for the child node. + 'kinetic,color-selection': + description: + Specifies the color selection for this LED. + Value 1 selects the color register for color red. + Value 2 selects the color register for color green. + Value 3 selects the color register for color blue. + The value can be either 0 or 1. If 0, the current for the colo= r + from color register 0 is used. If 1, the current for the color + from color register 1 is used. + $ref: /schemas/types.yaml#/definitions/uint8-array + items: + - minItems: 3 + - maxItems: 3 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + led-controller@14 { + compatible =3D "ti,lp5009"; + reg =3D <0x14>; + #address-cells =3D <1>; + #size-cells =3D <0>; + color-current0 =3D [ 00 00 00 ] // Current for RGB is 0mA + color-current1 =3D [ 28 28 28 ] // Current for RGB is 5mA + + multi-led@0 { + reg =3D <0x0>; + color =3D ; + function =3D LED_FUNCTION_CHARGING; + kinetic,color-selection =3D [ 00 01 00 ]; // Red=3D0mA G= reen=3D5mA Blue=3D0mA + }; + + multi-led@2 { + reg =3D <0x2>; + color =3D ; + function =3D LED_FUNCTION_STANDBY; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 736d564f7e93..125bae48c2d1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10607,6 +10607,7 @@ KTD20XX LED CONTROLLER DRIVER M: Florian Eckert L: linux-leds@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/leds/leds-ktd20xx.yaml F: drivers/leds/leds-ktd20xx.c =20 KTEST --=20 2.20.1