From patchwork Thu Jan 10 22:19:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 1023241 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43bL553kTKz9sCr for ; Fri, 11 Jan 2019 09:19:21 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729004AbfAJWTQ (ORCPT ); Thu, 10 Jan 2019 17:19:16 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:40005 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728825AbfAJWTQ (ORCPT ); Thu, 10 Jan 2019 17:19:16 -0500 Received: by mail-ot1-f67.google.com with SMTP id s5so11409322oth.7; Thu, 10 Jan 2019 14:19:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/noQUYeDpkKBReyP//Pz9IqsmXwtUQbgCHYAoh8XSQc=; b=DVIE9ywacScBr6YsJjycfkGUx9o4DrBXxPDlZAz1YXlOqcMNL64S8A48LWvrXKtF4n v6BHdkX6A1BU4a5ykq0BcpoZy0Tmjf8QKrrbATtvFvOdP/nDhrO2CceRqVz3ouLlil67 Rx+9K9eN+9YMVUBvYDzKxX8FNm7mwR5kJ+8tSL9JUz0FsR9uRzTu5Ma0t+3ULL7/QzVm NMrP24FSNkETLc9k+bwESO/7MSjaf5ghznz7mGssw0fYrKT46xGWQT6MhTGfFR3aTNGS 9nYpiHbugVb80TZl6htuSqz1l8EMBZ24qdnzVpu8rdTZm42U5i2qjUFLuKKb07piG7GK KClg== X-Gm-Message-State: AJcUukft3GSXFcbyB7T347hsdFvTjq2DgKlYpSsViejlQae8peZqQGhD bntmMz/CS2Kl72Jgx3bVDXTZMsM= X-Google-Smtp-Source: ALg8bN6dPVZI9Z1PWaUMzngwGbOnpPkE3vG9CiFNtFj/5dUxv1YECTY2rsO2ePMbrasqM8ExNVK7Bw== X-Received: by 2002:a9d:6f0b:: with SMTP id n11mr7492544otq.363.1547158754762; Thu, 10 Jan 2019 14:19:14 -0800 (PST) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id c19sm36776707otl.16.2019.01.10.14.19.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jan 2019 14:19:13 -0800 (PST) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Liam Girdwood , Mark Brown Subject: [PATCH] regulator: dt-bindings: Convert fixed-regulator to json-schema Date: Thu, 10 Jan 2019 16:19:03 -0600 Message-Id: <20190110221903.3990-6-robh@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the fixed-regulator binding to DT schema format using json-schema. Cc: Liam Girdwood Cc: Mark Brown Signed-off-by: Rob Herring --- .../bindings/regulator/fixed-regulator.txt | 35 ---------- .../bindings/regulator/fixed-regulator.yaml | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/fixed-regulator.txt create mode 100644 Documentation/devicetree/bindings/regulator/fixed-regulator.yaml diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt deleted file mode 100644 index 0c2a6c8a1536..000000000000 --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt +++ /dev/null @@ -1,35 +0,0 @@ -Fixed Voltage regulators - -Required properties: -- compatible: Must be "regulator-fixed"; -- regulator-name: Defined in regulator.txt as optional, but required here. - -Optional properties: -- gpio: gpio to use for enable control -- startup-delay-us: startup time in microseconds -- enable-active-high: Polarity of GPIO is Active high -If this property is missing, the default assumed is Active low. -- gpio-open-drain: GPIO is open drain type. - If this property is missing then default assumption is false. --vin-supply: Input supply name. - -Any property defined as part of the core regulator -binding, defined in regulator.txt, can also be used. -However a fixed voltage regulator is expected to have the -regulator-min-microvolt and regulator-max-microvolt -to be the same. - -Example: - - abc: fixedregulator@0 { - compatible = "regulator-fixed"; - regulator-name = "fixed-supply"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - gpio = <&gpio1 16 0>; - startup-delay-us = <70000>; - enable-active-high; - regulator-boot-on; - gpio-open-drain; - vin-supply = <&parent_reg>; - }; diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml new file mode 100644 index 000000000000..a7607b0baab7 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/fixed-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Fixed Voltage regulators + +maintainers: + - Liam Girdwood + - Mark Brown + +description: + Any property defined as part of the core regulator binding, defined in + regulator.txt, can also be used. However a fixed voltage regulator is + expected to have the regulator-min-microvolt and regulator-max-microvolt + to be the same. + +properties: + compatible: + const: regulator-fixed + + regulator-name: true + + gpio: + description: gpio to use for enable control + maxItems: 1 + + startup-delay-us: + description: startup time in microseconds + $ref: /schemas/types.yaml#/definitions/uint32 + + enable-active-high: + description: + Polarity of GPIO is Active high. If this property is missing, + the default assumed is Active low. + type: boolean + + gpio-open-drain: + description: + GPIO is open drain type. If this property is missing then default + assumption is false. + type: boolean + + vin-supply: + description: Input supply phandle. + $ref: /schemas/types.yaml#/definitions/phandle + +required: + - compatible + - regulator-name + +examples: + - | + abc: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&gpio1 16 0>; + startup-delay-us = <70000>; + enable-active-high; + regulator-boot-on; + gpio-open-drain; + vin-supply = <&parent_reg>; + }; +...