From patchwork Wed Jul 21 14:04:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 483467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33011C636C9 for ; Wed, 21 Jul 2021 14:05:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CA2361248 for ; Wed, 21 Jul 2021 14:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237527AbhGUNZL (ORCPT ); Wed, 21 Jul 2021 09:25:11 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:51767 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234757AbhGUNZL (ORCPT ); Wed, 21 Jul 2021 09:25:11 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 943B25C0140; Wed, 21 Jul 2021 10:05:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 21 Jul 2021 10:05:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=XUFy7HGzoNamF DNeqWWt+O726CeLlPdzxeqVacxyPcY=; b=iywCHRDcfZcwHfUHcxF+8fCauL5gy ovHRvaJLyBusHk7CKPkSc/6TtxZ8SyRZAoiMxmfkDCvuPzXzN3EHuxii+++sXz/Z QBdXiLhUoDF7vj32HdC+TYp0ajgEIv6FdYeBG0PkUGur9MCrg/DdaWuCNKN9j/TI j8DJlDnsDrH4w6e4uFh1flCampgcgE5IeE2/rk/wwelYWlpcyTKoyOgtssXdP7HR ROmoVTd2Gq5UwkBlR0pw11MVNxo+MIfQseMMVSFBdawLBA5xYSxwAsQ5QbwH3RSM VkxlAI6AI/oStBYrtmAZWTgdbTYp526xsoyedOlrFOBKblvRLm4LnwSHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=XUFy7HGzoNamFDNeqWWt+O726CeLlPdzxeqVacxyPcY=; b=g+42Nr53 WRrr93iQfVjc+y/h3x45w2rbBjCFYyPkRalC3rMiJbfvobEej/MB2RM0PfE5IsU7 v/3PYuG7FX8OYQpXfvEUuzGkVvefmSh3qL7LKe0xb+5DMwCHdANKKM0cpG+IAg/u Z8qSN60Va4dXHvr6PJLwlnBUHeGZgZ5EgChkj/ksQnTLly1s2Bo7HM/mqx1QFaZV SFi4s5M8/xa9YyRd5CeE05tgxB6QEulxUlq2Wc1RAbmDt3Me857U+AzqadT2QMam 1vd1bHkB85GdXBLpabWRurkG68UFDj23/rXj+61nQkaCZEVAMkMwchU1WxL/HOYN AT3fxlAAbauWMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfeeggdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog evohgrshhtrghlqdfhgeduvddqtddvucdludehtddmnecujfgurhephffvufffkffojghf ggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhmvgcutfhiphgrrhguuceomhgrgi himhgvsegtvghrnhhordhtvggthheqnecuggftrfgrthhtvghrnhepveejieejtdevgfff gfejuefggfeutdelteekgeetueeftddutddtgfffhffgueffnecuffhomhgrihhnpeguvg hvihgtvghtrhgvvgdrohhrghenucevlhhushhtvghrufhiiigvpeejnecurfgrrhgrmhep mhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Jul 2021 10:05:46 -0400 (EDT) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Jernej Skrabec , devicetree@vger.kernel.org, Rob Herring , Frank Rowand Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, Daniel Mack , Evgeniy Polyakov Subject: [PATCH 38/54] dt-bindings: w1: Convert 1-Wire GPIO binding to a schema Date: Wed, 21 Jul 2021 16:04:08 +0200 Message-Id: <20210721140424.725744-39-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210721140424.725744-1-maxime@cerno.tech> References: <20210721140424.725744-1-maxime@cerno.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Bitbanged 1-Wire buses are supported by Linux thanks to their device tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema. Cc: Daniel Mack Cc: Evgeniy Polyakov Signed-off-by: Maxime Ripard --- .../devicetree/bindings/w1/w1-gpio.txt | 27 ------------ .../devicetree/bindings/w1/w1-gpio.yaml | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/w1/w1-gpio.txt create mode 100644 Documentation/devicetree/bindings/w1/w1-gpio.yaml diff --git a/Documentation/devicetree/bindings/w1/w1-gpio.txt b/Documentation/devicetree/bindings/w1/w1-gpio.txt deleted file mode 100644 index 3d6554eac240..000000000000 --- a/Documentation/devicetree/bindings/w1/w1-gpio.txt +++ /dev/null @@ -1,27 +0,0 @@ -w1-gpio devicetree bindings - -Required properties: - - - compatible: "w1-gpio" - - gpios: one or two GPIO specs: - - the first one is used as data I/O pin - - the second one is optional. If specified, it is used as - enable pin for an external pin pullup. - -Optional properties: - - - linux,open-drain: if specified, the data pin is considered in - open-drain mode. - -Also refer to the generic w1.txt document. - -Examples: - - onewire { - compatible = "w1-gpio"; - gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - - battery { - // ... - }; - }; diff --git a/Documentation/devicetree/bindings/w1/w1-gpio.yaml b/Documentation/devicetree/bindings/w1/w1-gpio.yaml new file mode 100644 index 000000000000..4a780a988718 --- /dev/null +++ b/Documentation/devicetree/bindings/w1/w1-gpio.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/w1/w1-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bitbanged GPIO 1-Wire Bus Device Tree Bindings + +maintainers: + - Daniel Mack + +properties: + compatible: + const: w1-gpio + + gpios: + minItems: 1 + maxItems: 2 + items: + - description: Data I/O pin + - description: Enable pin for an external pull-up resistor + + linux,open-drain: + type: boolean + description: > + If specified, the data pin is considered in open-drain mode. + +required: + - compatible + - gpios + +additionalProperties: false + +examples: + - | + #include + + onewire { + compatible = "w1-gpio"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + +...