Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1280609imi; Fri, 1 Jul 2022 06:46:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uhp4531U9aCl+Za+5FbiWCyM3KSwk5ePTmDktUoBMNw3ztGwM/uNckzKqtYOgPUETVrqwQ X-Received: by 2002:a05:6a00:1592:b0:525:52ca:bee6 with SMTP id u18-20020a056a00159200b0052552cabee6mr20851723pfk.38.1656683164587; Fri, 01 Jul 2022 06:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656683164; cv=none; d=google.com; s=arc-20160816; b=gD6d8QRd669Z7cL5e/NS124wNMwRQgQJV/PEdM4sLip4kVktf7NDN1YLi5RQaObwWa /w91catLaR8BYRTVzhJLnDZWpG/PdUR6N128ky0euKuTkGLckz+RcGkatGTrYc/q6ZPt eZl7B+3t3koj9a0SmKfWZcvszvpRHqc93N2VbbfSa2c/aPqoMJa/3sPhoXKb/OLgV2wY AM2SgPoJr0w0xQY8oQLLgKJfPx7W1yF+pBGhh53js5baIJgMHJW96K+xwwj8dveFP9hY WRAk3lD+IFe1T3RQY7Uo6we4cr8CeSmaNnDD7LxARlFx8OQwlGOlUUNSbCZ/1vQhIJu0 /kpQ== 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 :dkim-signature; bh=o+ZLX2JL2L+wjnW9sjCReCR+n+3uLypEM0TOcfyW6qg=; b=m3Hy4aviIdomsO5nHscYhzAunO2kua0/4XvyEFhv5kVn7+Zm+DXb6S5Epm/Bh5GY1D tKlgioZhMwPwJdCR11Zey0sVfPmIRP994ePVsLm/AqRWTriq8zfT+cSC+AH63mTLwoXS IkZbULyCHHyQUlOaBILjxmhXD1sow4/viPPsXk8GiCEK39CbBMqGjh/niviWILk3oN0v i1VNguLeQDYGBLwLH5fsITZdJZ01jAgZvMJUmyzPg93cjYKC6d4keQwnnz0eCgfg7o3z FBCCe+SF65HOaGIe2mXzdz9jJC6RCObkTxK2prLiG5a2/Wza2SMuhWMlGc/pOUISYJey 31jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=jkTHCLMs; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id np17-20020a17090b4c5100b001e0552f722asi8030988pjb.87.2022.07.01.06.45.51; Fri, 01 Jul 2022 06:46:04 -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=fail header.i=@mailoo.org header.s=mailo header.b=jkTHCLMs; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231293AbiGANpK (ORCPT + 99 others); Fri, 1 Jul 2022 09:45:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231421AbiGANpI (ORCPT ); Fri, 1 Jul 2022 09:45:08 -0400 Received: from msg-4.mailo.com (ip-15.mailobj.net [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD1A523179; Fri, 1 Jul 2022 06:45:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1656683077; bh=R2TZUX7HvJoriIsjafSYint4EqnS9bqGk1NLg4+n2L4=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=jkTHCLMsr2hYh/jCzo7FxmJ4UasCE29P3XXQ7E5GH0BSz/VzK5MNDT2wTMJkBuQ97 WNCSFlxg6+Ni9PwqBZHLy5SDyotQDM44JMEwqswtUY+y1unbs5ZXgxE2vncc2aEkTk 5dvq+L7V1GuTMF3WHN1e8eJgKFu/DHItgmfWIpoQ= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via [213.182.55.207] Fri, 1 Jul 2022 15:44:37 +0200 (CEST) X-EA-Auth: v+sIOiYhj3PdV++MzRLiMly05cFbE9hfZ8Bbxmm+S5IxUmYv/v9WySdrZludU+q4002QNFc+ibSD0CuRx77XCz0C9E6rmdtAUvdbRQjUyIs= From: Vincent Knecht To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , "H. Nikolaus Schaller" , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Vincent Knecht Subject: [PATCH v2 1/6] dt-bindings: leds: Convert is31fl319x to dtschema Date: Fri, 1 Jul 2022 15:44:08 +0200 Message-Id: <20220701134415.4017794-2-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220701134415.4017794-1-vincent.knecht@mailoo.org> References: <20220701134415.4017794-1-vincent.knecht@mailoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 leds-is31fl319x.txt to dtschema. Signed-off-by: Vincent Knecht --- .../bindings/leds/issi,is31fl319x.yaml | 113 ++++++++++++++++++ .../bindings/leds/leds-is31fl319x.txt | 61 ---------- 2 files changed, 113 insertions(+), 61 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml delete mode 100644 Documentation/devicetree/bindings/leds/leds-is31fl319x.txt diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml new file mode 100644 index 000000000000..17635a7cf8af --- /dev/null +++ b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml @@ -0,0 +1,113 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/issi,is31fl319x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ISSI LED controllers bindings for IS31FL319{0,1,3,6,9} + +maintainers: + - H. Nikolaus Schaller + +description: | + The IS31FL319X are LED controllers with I2C interface. + Previously known as Si-En SN319{0,1,3,6,9}. + + For more product information please see the links below: + https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf + https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf + https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf + https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf + https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf + +properties: + compatible: + enum: + - issi,is31fl3190 + - issi,is31fl3191 + - issi,is31fl3193 + - issi,is31fl3196 + - issi,is31fl3199 + - si-en,sn3199 + + reg: + maxItems: 1 + + shutdown-gpios: + maxItems: 1 + description: GPIO attached to the SDB pin. + + audio-gain-db: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + description: Audio gain selection for external analog modulation input. + enum: [0, 3, 6, 9, 12, 15, 18, 21] + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[1-9]$": + type: object + $ref: common.yaml# + + properties: + reg: + description: Index of the LED. + minimum: 1 + maximum: 9 + + led-max-microamp: + default: 20000 + enum: [5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000] + description: + Note that a driver will take the lowest of all LED limits + since the chip has a single global setting. The lowest value + will be chosen due to the PWM specificity, where lower + brightness is achieved by reducing the duty-cycle of pulses + and not the current, which will always have its peak value + equal to led-max-microamp. + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + #include + + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@65 { + compatible = "issi,is31fl3196"; + reg = <0x65>; + #address-cells = <1>; + #size-cells = <0>; + + shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + + led@1 { + reg = <1>; + label = "red:aux"; + led-max-microamp = <10000>; + }; + + led@5 { + reg = <5>; + label = "green:power"; + linux,default-trigger = "default-on"; + }; + }; + }; +... + diff --git a/Documentation/devicetree/bindings/leds/leds-is31fl319x.txt b/Documentation/devicetree/bindings/leds/leds-is31fl319x.txt deleted file mode 100644 index 676d43ec8169..000000000000 --- a/Documentation/devicetree/bindings/leds/leds-is31fl319x.txt +++ /dev/null @@ -1,61 +0,0 @@ -LEDs connected to is31fl319x LED controller chip - -Required properties: -- compatible : Should be any of - "issi,is31fl3190" - "issi,is31fl3191" - "issi,is31fl3193" - "issi,is31fl3196" - "issi,is31fl3199" - "si-en,sn3199". -- #address-cells: Must be 1. -- #size-cells: Must be 0. -- reg: 0x64, 0x65, 0x66, or 0x67. - -Optional properties: -- audio-gain-db : audio gain selection for external analog modulation input. - Valid values: 0 - 21, step by 3 (rounded down) - Default: 0 -- shutdown-gpios : Specifier of the GPIO connected to SDB pin of the chip. - -Each led is represented as a sub-node of the issi,is31fl319x device. -There can be less leds subnodes than the chip can support but not more. - -Required led sub-node properties: -- reg : number of LED line - Valid values: 1 - number of leds supported by the chip variant. - -Optional led sub-node properties: -- label : see Documentation/devicetree/bindings/leds/common.txt. -- linux,default-trigger : - see Documentation/devicetree/bindings/leds/common.txt. -- led-max-microamp : (optional) - Valid values: 5000 - 40000, step by 5000 (rounded down) - Default: 20000 (20 mA) - Note: a driver will take the lowest of all led limits since the - chip has a single global setting. The lowest value will be chosen - due to the PWM specificity, where lower brightness is achieved - by reducing the dury-cycle of pulses and not the current, which - will always have its peak value equal to led-max-microamp. - -Examples: - -fancy_leds: leds@65 { - compatible = "issi,is31fl3196"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0x65>; - shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; - - red_aux: led@1 { - label = "red:aux"; - reg = <1>; - led-max-microamp = <10000>; - }; - - green_power: led@5 { - label = "green:power"; - reg = <5>; - linux,default-trigger = "default-on"; - }; -}; -- 2.35.3