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: 12391211 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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 33563C12002 for ; Wed, 21 Jul 2021 14:47:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9E9560D07 for ; Wed, 21 Jul 2021 14:47:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9E9560D07 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O7KQBx8RYSdsP+NhBCYes1vtVnCk8n/mIB/a9T61mPM=; b=Y0E3zPwSBfgTc+ ygsGyUJ1HTyVI4MHUYqf7gAvewpbkvQogFNzPLeOrwNwP0DUyYHMK9ofZDaB/7674TnQyKIxUyWMZ WdccCZof0Z13K0dSYIQU3iNeq166g+uz3UYT7rom0lz5tu3P0/yhyy6OWJnIbu9imx/9DLuQX21Tv NnoucSc3cmlPnpGs7pPHThLN0y1KFsIvD1GxOOUzioZSoDk7YmyFp0svoLSo7lYHdfjtss+UlOnft 7XSg7pSNI+OT+X0ykl5uxFYpf87e7iHykqUF9ryKE9+HYShg6Se6OULMipkhCvOOhvJn5Qc35A2/T HdN6sxoGhiIBDY9Y3HvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6DT3-00G3sW-90; Wed, 21 Jul 2021 14:45:02 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6Cr6-00FqNP-C8 for linux-arm-kernel@lists.infradead.org; Wed, 21 Jul 2021 14:05:50 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210721_070548_557178_4DF97B2A X-CRM114-Status: GOOD ( 18.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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>; + }; + +...