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 X-Patchwork-Id: 155285 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2418902jaa; Thu, 10 Jan 2019 14:19:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN7me+mBos+NISAyt+uE0V58aRQL1gyIYSD1VeR+6mlVh9ebQY3s46DoHlaAKPEa/J/JAbzm X-Received: by 2002:a62:5dd1:: with SMTP id n78mr11771906pfj.58.1547158760853; Thu, 10 Jan 2019 14:19:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547158760; cv=none; d=google.com; s=arc-20160816; b=wENIz3njz0kOyTAegFAMm3RK1nE18+mrROmQq4RsNKvjZ+DnaWkIn30qICG3T4Al30 XX3ddbgrKPyUee5M0R7BdcnQjiwfflK0niikgpgiIzVpzgU0yypGxfaIK23LsGEFnyot mvyqZaeK0LnaBfU6pw1AuaIpVUquo3aqN7tPNsoJfRxdcPucovj3SukQvEBCcGSBpkJD LnpqXxjWQ1eA9sjTe+jMZZJA/wKyNrmJ7Cu6uddiHIe7DuFbuoKOvFQgo4rDnbNi1qpS zqib0WVkmzpxgMmAm3pWpqpKYn5A9tQKq2BvtsUkEJiz+sVHQ7WLVSronblo1J6qUo7V h9Kw== 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 :message-id:date:subject:cc:to:from; bh=/noQUYeDpkKBReyP//Pz9IqsmXwtUQbgCHYAoh8XSQc=; b=aPZH20ZFlzb42GknlrR0u9od/Mq/TDhIZaB5Msg4v1KXMtzEC2agYaaQfV00tUUy29 xxFh0bzB9fUR5E2V+0PXLn0mS4mPWe/YjSeRQxyQmVkL4tOG7zq9uGnOdnmZdtDyhmre iN0977bcV5p6VjsFPzOZaYn/xksudKhBMNOHsIyf+44bYcCWgM47D8T5VpkB2NMDy/OF wxMiq9nlJQxS6bLSN8iiSpYRbx6kqr3j6pYtoe8df4lu9FepbRo68+vB9Vb4xYBRxDYt klaj24zXZBdG7pcvIqEoUUqS2/EyA0BwtSLnDnpxZm3DvqS7ciBy+2KOoKyQSNeqq5IT qVbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si19358265pgi.547.2019.01.10.14.19.20; Thu, 10 Jan 2019 14:19:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729004AbfAJWTQ (ORCPT + 7 others); 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-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 -- 2.19.1 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>; + }; +...