Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp351242pxf; Wed, 17 Mar 2021 06:51:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/TkV/Hcu3ATwRfMXs7EXlhzT1I+4mycXcxWI590QpbFBK5q56h+BNeWig/Zumo4/2o6va X-Received: by 2002:a17:906:3b41:: with SMTP id h1mr34190836ejf.506.1615989113083; Wed, 17 Mar 2021 06:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615989113; cv=none; d=google.com; s=arc-20160816; b=EirD5bO80oLi2t4Mtc9D+dO9r80mX8kMmUBv3Mtrl0RwtJf0Qv/X1GC7tQV8mDSIxM KF/Fg7XsqH2Bt1YkRsy9XijVOa8fu4+JK073g2sFZiDOFOzCodZJtfdsKoxOgoB6oVmB PXnmazF5Ti1bzWMUTbWKWnP3+sDa6BuMGeRjeO9OU/oH+FfudQ5r8syNs3YtC0SxeAjN g2g5RP66q2hmrtHkEWwEfqGC/g9ifavXet+AFrs+5sfOusIWm32i6Mdh/5pn0ziN4BYM 9Uo5flWKaOA1nMz/GCJojcWfmn3VHyE8yIEYJ5TDdcdWDJmqn1NfbNKkLB8CKBVf2vop Z2eg== 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=ppVuYiiZWv6lzbA580vuY1S0qqyA1XwVaBA9TLXie4Q=; b=NaVJVfKkgTMjvvORm5lMx4TitxqtBc7+/fXl9sPmG9IpcxBnpM16uaycHxis+w2qpj 3T7K/14eVkrGbVjoyzI8cASMp2xU+fvkJ889bnwPvST3U6I9uH//odcUsVMsmcKe2/WW 2MsWscqcJEV1zxDaiguKWVl9LQqXVA4olwXKoC3Iz0K/I5APKOZy856gZy75YipMqab7 t9x0PS58LLjEBolLjPosoS5gYDp2i1ttVBkkGZnRJrXoTJRMFmd0v73hqr24zDAlgDlu 7P/EApQiTuXK32XoYkZRI0/SzleeHLQy7Vivd8QIyimkmB4Gp20hcmT3U8X5XgTtQJLC EXDA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si17054140eju.412.2021.03.17.06.51.30; Wed, 17 Mar 2021 06:51:53 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbhCQNuQ (ORCPT + 99 others); Wed, 17 Mar 2021 09:50:16 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:56180 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231458AbhCQNtN (ORCPT ); Wed, 17 Mar 2021 09:49:13 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id AABA91F44E60 Received: by jupiter.universe (Postfix, from userid 1000) id CEBBD4800E0; Wed, 17 Mar 2021 14:49:05 +0100 (CET) From: Sebastian Reichel To: Sebastian Reichel , Rob Herring Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCHv2 08/38] dt-bindings: power: supply: bq24735: Convert to DT schema format Date: Wed, 17 Mar 2021 14:48:34 +0100 Message-Id: <20210317134904.80737-9-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210317134904.80737-1-sebastian.reichel@collabora.com> References: <20210317134904.80737-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel --- .../bindings/power/supply/bq24735.yaml | 89 +++++++++++++++++++ .../bindings/power/supply/ti,bq24735.txt | 39 -------- 2 files changed, 89 insertions(+), 39 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/supply/bq24735.yaml delete mode 100644 Documentation/devicetree/bindings/power/supply/ti,bq24735.txt diff --git a/Documentation/devicetree/bindings/power/supply/bq24735.yaml b/Documentation/devicetree/bindings/power/supply/bq24735.yaml new file mode 100644 index 000000000000..131be6782c4b --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/bq24735.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2021 Sebastian Reichel +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/supply/bq24735.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Binding for TI BQ24735 Li-Ion Battery Charger + +maintainers: + - Sebastian Reichel + +allOf: + - $ref: power-supply.yaml# + +properties: + compatible: + const: ti,bq24735 + + reg: + maxItems: 1 + + interrupts: + description: AC adapter plug event interrupt + maxItems: 1 + + ti,ac-detect-gpios: + maxItems: 1 + description: | + This GPIO is optionally used to read the AC adapter status. This is a Host GPIO + that is configured as an input and connected to the ACOK pin on the bq24735. + Note: for backwards compatibility reasons, the GPIO must be active on AC adapter + absence despite ACOK being active (high) on AC adapter presence. + + ti,charge-current: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Used to control and set the charging current. + This value must be between 128mA and 8.128A with a 64mA step resolution. + The POR value is 0x0000h. This number is in mA (e.g. 8192). + See spec for more information about the ChargeCurrent (0x14h) register. + + ti,charge-voltage: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Used to control and set the charging voltage. + This value must be between 1.024V and 19.2V with a 16mV step resolution. + The POR value is 0x0000h. This number is in mV (e.g. 19200). + See spec for more information about the ChargeVoltage (0x15h) register. + + ti,input-current: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Used to control and set the charger input current. + This value must be between 128mA and 8.064A with a 128mA step resolution. + The POR value is 0x1000h. This number is in mA (e.g. 8064). + See the spec for more information about the InputCurrent (0x3fh) register. + + ti,external-control: + type: boolean + description: | + Indicates that the charger is configured externally and that the host should not + attempt to enable/disable charging or set the charge voltage/current. + + poll-interval: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + If 'interrupts' is not specified, poll AC adapter presence with this interval (milliseconds). + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + charger@9 { + compatible = "ti,bq24735"; + reg = <0x9>; + ti,ac-detect-gpios = <&gpio 72 0x1>; + }; + }; diff --git a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt deleted file mode 100644 index de45e1a2a4d9..000000000000 --- a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt +++ /dev/null @@ -1,39 +0,0 @@ -TI BQ24735 Charge Controller -~~~~~~~~~~ - -Required properties : - - compatible : "ti,bq24735" - -Optional properties : - - interrupts : Specify the interrupt to be used to trigger when the AC - adapter is either plugged in or removed. - - ti,ac-detect-gpios : This GPIO is optionally used to read the AC adapter - status. This is a Host GPIO that is configured as an input and connected - to the ACOK pin on the bq24735. Note: for backwards compatibility reasons, - the GPIO must be active on AC adapter absence despite ACOK being active - (high) on AC adapter presence. - - ti,charge-current : Used to control and set the charging current. This value - must be between 128mA and 8.128A with a 64mA step resolution. The POR value - is 0x0000h. This number is in mA (e.g. 8192), see spec for more information - about the ChargeCurrent (0x14h) register. - - ti,charge-voltage : Used to control and set the charging voltage. This value - must be between 1.024V and 19.2V with a 16mV step resolution. The POR value - is 0x0000h. This number is in mV (e.g. 19200), see spec for more information - about the ChargeVoltage (0x15h) register. - - ti,input-current : Used to control and set the charger input current. This - value must be between 128mA and 8.064A with a 128mA step resolution. The - POR value is 0x1000h. This number is in mA (e.g. 8064), see the spec for - more information about the InputCurrent (0x3fh) register. - - ti,external-control : Indicates that the charger is configured externally - and that the host should not attempt to enable/disable charging or set the - charge voltage/current. - - poll-interval : In case 'interrupts' is not specified, poll AC adapter - presence with this interval (milliseconds). - -Example: - - bq24735@9 { - compatible = "ti,bq24735"; - reg = <0x9>; - ti,ac-detect-gpios = <&gpio 72 0x1>; - } -- 2.30.2