Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2500951ybg; Fri, 5 Jun 2020 15:47:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZg/tncaG1eBxLVGv5mSVGwFYl68vKTcad4gFhaYw6EDLQclQWicUhifS3wJh67NNgnbLe X-Received: by 2002:a50:e8c6:: with SMTP id l6mr5851416edn.276.1591397244516; Fri, 05 Jun 2020 15:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591397244; cv=none; d=google.com; s=arc-20160816; b=boPIkDAoVx2me4c8QBwBbStQRUKm506YfB9JbQr0uyz352b2K3+W4LfB5gVA4DC+Dr swrqHoeAq81eb0AXBBs2h+AgjgHsexqDhVfhYv2zb9BNLOkvC7Adew3Sni4Fx+yRWi9b psHVcZ4zWjDcDALt+Zmt79lmT5UeadsrRsvAfOD8tbKsiP10TfRZ06HbZu5bysjm/d6V GC/Ee7ugITu/EZgApv6PBw1mTu/I3z1ktLALJle7PuNHO+dNJVG2FlRSyVUT64Dy8VrY FhbxRqbyRepLQz61VKVTI1J2RpEe2BvTw30LaUuQ1go0hmVc8nWxO7qv9KrW4hc+7SqC D4nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5bfV+GctQeZH35qvZHd0TFmM0qELecOaYUuw31mgCF4=; b=X12sPwG/JJFqxE1GSyWqzYFKzyW69mRNElr7r6y7Z8UBeOph89Av8no9VexRBEKqKM 2pAYayjnHrYRrQVKrHEZDVRGVWAAuJnr0hTvOkb+RQBTJlNH2Eflfa+uLwWrOIf8nUTi iTcjrrvNXgjjvM6VM4rHWUseis2e2K5n9Oggqd6FSP2Wuc7py1jHcKNbKjD2XevSMBQ0 T0udOTj+r/9P6u2cJJ7sZG/h0XmnSo2qUdbgKqLzPG7nJrgRMYT+FeEmO15a7Wzfuteb fsmBJ6Eu/YXbtQvHymPp1z0KFjzx7VgazNOXWwQLwGqXiBRxjXxq6bPnihL4cq1znNCd X/2Q== 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 i9si4364661ejg.564.2020.06.05.15.47.02; Fri, 05 Jun 2020 15:47:24 -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 S1725878AbgFEWoM (ORCPT + 99 others); Fri, 5 Jun 2020 18:44:12 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:41692 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728297AbgFEWoK (ORCPT ); Fri, 5 Jun 2020 18:44:10 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 415552A51AA Received: by jupiter.universe (Postfix, from userid 1000) id 263574800FF; Sat, 6 Jun 2020 00:44:04 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel , Rob Herring , Emil Velikov Cc: Linus Walleij , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, linux-arm-kernel@lists.infradead.org, Sebastian Reichel Subject: [PATCHv2 1/6] dt-bindings: power: supply: gpio-charger: convert to yaml Date: Sat, 6 Jun 2020 00:43:58 +0200 Message-Id: <20200605224403.181015-2-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605224403.181015-1-sebastian.reichel@collabora.com> References: <20200605224403.181015-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the gpio-charger bindings from text format to new YAML based representation. Signed-off-by: Sebastian Reichel --- .../bindings/power/supply/gpio-charger.txt | 31 ---------- .../bindings/power/supply/gpio-charger.yaml | 58 +++++++++++++++++++ 2 files changed, 58 insertions(+), 31 deletions(-) delete mode 100644 Documentation/devicetree/bindings/power/supply/gpio-charger.txt create mode 100644 Documentation/devicetree/bindings/power/supply/gpio-charger.yaml diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt b/Documentation/devicetree/bindings/power/supply/gpio-charger.txt deleted file mode 100644 index 0fb33b2c62a6..000000000000 --- a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt +++ /dev/null @@ -1,31 +0,0 @@ -gpio-charger - -Required properties : - - compatible : "gpio-charger" - - gpios : GPIO indicating the charger presence. - See GPIO binding in bindings/gpio/gpio.txt . - - charger-type : power supply type, one of - unknown - battery - ups - mains - usb-sdp (USB standard downstream port) - usb-dcp (USB dedicated charging port) - usb-cdp (USB charging downstream port) - usb-aca (USB accessory charger adapter) - -Optional properties: - - charge-status-gpios: GPIO indicating whether a battery is charging. - -Example: - - usb_charger: charger { - compatible = "gpio-charger"; - charger-type = "usb-sdp"; - gpios = <&gpd 28 GPIO_ACTIVE_LOW>; - charge-status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>; - }; - - battery { - power-supplies = <&usb_charger>; - }; diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml new file mode 100644 index 000000000000..78b167c62ab1 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/gpio-charger.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: simple battery chargers only communicating through GPIOs + +maintainers: + - Sebastian Reichel + +description: + This binding is for all chargers, which are working more or less + autonomously, only providing some status GPIOs and possibly some + GPIOs for limited control over the charging process. + +properties: + compatible: + const: gpio-charger + + charger-type: + enum: + - unknown + - battery + - ups + - mains + - usb-sdp # USB standard downstream port + - usb-dcp # USB dedicated charging port + - usb-cdp # USB charging downstream port + - usb-aca # USB accessory charger adapter + description: + Type of the charger, e.g. "mains" for a wall charger. + + gpios: + maxItems: 1 + description: GPIO indicating the charger presence + + charge-status-gpios: + maxItems: 1 + description: GPIO indicating the charging status + +required: + - compatible + - gpios + +additionalProperties: false + +examples: + - | + #include + + charger { + compatible = "gpio-charger"; + charger-type = "usb-sdp"; + + gpios = <&gpd 28 GPIO_ACTIVE_LOW>; + charge-status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>; + }; -- 2.26.2