Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp353197pxf; Wed, 17 Mar 2021 06:53:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwD/aofiOCxf7OT0fFmeGYyGm1z/+qyBZHgLdwGWFqgkFgcPva72tfLCAeX0IADgYXADKJ X-Received: by 2002:a17:906:3750:: with SMTP id e16mr35245131ejc.75.1615989232903; Wed, 17 Mar 2021 06:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615989232; cv=none; d=google.com; s=arc-20160816; b=Yfh+rog52kvNAn2/QvmthaQiXqZ1nx2jBvJf2XSpuhcKMUQSmst5YaXXQKm8/xilc+ hitFkdOjvQrMFU+XG9ZvN7wKW/TJBMNu/A7qiu17QVFLqnq61RtOs5KPY1kPvfSxM4rF qjqUFQPMN5pkUaZ4yPb8T3ClepQyICPd8Jo2jQrcUPxq4aZfud1Cr7/rlDxUXLUDSyPB QCUfuB8ooUCJmcCCcgxn62M8M3k+rL6HS8xj4Aa1pvK7ZAyHIaBhLt5btLFIHD8IdYGP NphlW+to0xWPkTJOsF7YJwD79WRqnv7vTYaLbpXAN00nrny+RVvstvYzgaXp57pQv6fr Oh7Q== 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=yL1YDCf3Cu0a+Fu029PKEVEWR4C5jOzjQOUFki4vUCs=; b=TmW7PPcugY60oi5D85SV2hTth9L65huKXgoD8PLL227CktauKTsDeyU/fnpy+rkt0e YBzs1vmjSGEjAZJ10AVy1+zP9Wh12qAuubbyc/Qmc4sU01e375TacIQlhB4l5XisH9ue H+AjysdmNETItvfgnuELfUAh1D6xFnoIYFKiPWWnxN1UFzAFXuNT65b3qYlXL8VLNDyM 764h8vpZ3ORco74bfHOX8XHb3AV1/4jSIxwwYVLRE/TsIiQjwRQRg74xalAtx4SwWWar dbN2A1yvta6CmieAVk4Mwv218nWUYksrSrgDcbHGRE4E8xkAy3bIVn8KRfHNcYkCTfBl sN+Q== 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 h20si15747667ejc.687.2021.03.17.06.53.29; Wed, 17 Mar 2021 06:53:52 -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 S231772AbhCQNuY (ORCPT + 99 others); Wed, 17 Mar 2021 09:50:24 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:56184 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231476AbhCQNtO (ORCPT ); Wed, 17 Mar 2021 09:49:14 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id D4E2A1F4521F Received: by jupiter.universe (Postfix, from userid 1000) id 04FDF48010A; Wed, 17 Mar 2021 14:49:06 +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 23/38] dt-bindings: power: supply: max8903: Convert to DT schema format Date: Wed, 17 Mar 2021 14:48:49 +0100 Message-Id: <20210317134904.80737-24-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/max8903-charger.txt | 24 ------- .../bindings/power/supply/maxim,max8903.yaml | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 24 deletions(-) delete mode 100644 Documentation/devicetree/bindings/power/supply/max8903-charger.txt create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max8903.yaml diff --git a/Documentation/devicetree/bindings/power/supply/max8903-charger.txt b/Documentation/devicetree/bindings/power/supply/max8903-charger.txt deleted file mode 100644 index bab947fef025..000000000000 --- a/Documentation/devicetree/bindings/power/supply/max8903-charger.txt +++ /dev/null @@ -1,24 +0,0 @@ -Maxim Semiconductor MAX8903 Battery Charger bindings - -Required properties: -- compatible: "maxim,max8903" for MAX8903 Battery Charger -- dok-gpios: Valid DC power has been detected (active low, input), optional if uok-gpios is provided -- uok-gpios: Valid USB power has been detected (active low, input), optional if dok-gpios is provided - -Optional properties: -- cen-gpios: Charge enable pin (active low, output) -- chg-gpios: Charger status pin (active low, input) -- flt-gpios: Fault pin (active low, output) -- dcm-gpios: Current limit mode setting (DC=1 or USB=0, output) -- usus-gpios: USB suspend pin (active high, output) - - -Example: - - max8903-charger { - compatible = "maxim,max8903"; - dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; - flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; - chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; - cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; - }; diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max8903.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max8903.yaml new file mode 100644 index 000000000000..4828ca0842ae --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/maxim,max8903.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/supply/maxim,max8903.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Maxim Semiconductor MAX8903 Battery Charger + +maintainers: + - Sebastian Reichel + +allOf: + - $ref: power-supply.yaml# + +properties: + compatible: + const: maxim,max8903 + + dok-gpios: + maxItems: 1 + description: Valid DC power has been detected (active low, input) + + uok-gpios: + maxItems: 1 + description: Valid USB power has been detected (active low, input) + + cen-gpios: + maxItems: 1 + description: Charge enable pin (active low, output) + + chg-gpios: + maxItems: 1 + description: Charger status pin (active low, input) + + flt-gpios: + maxItems: 1 + description: Fault pin (active low, output) + + dcm-gpios: + maxItems: 1 + description: Current limit mode setting (DC=1 or USB=0, output) + + usus-gpios: + maxItems: 1 + description: USB suspend pin (active high, output) + +required: + - compatible + +anyOf: + - required: + - dok-gpios + - required: + - uok-gpios + +additionalProperties: false + +examples: + - | + #include + charger { + compatible = "maxim,max8903"; + dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; + cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; + }; -- 2.30.2