Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4285588img; Tue, 26 Mar 2019 06:41:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqylJTcGT5WsI1rAeKACSpKAE3T660yrG3zzLsfAm7p0dkhXmpKaBmeDAZbgMWBre4R5nWFu X-Received: by 2002:a63:e70c:: with SMTP id b12mr29328161pgi.399.1553607680469; Tue, 26 Mar 2019 06:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553607680; cv=none; d=google.com; s=arc-20160816; b=PK1mbenvqW0OqH2xScjVHvGjAE2oCg9/v7+bTIAE/z87gE5pCNXiEKjofTCkwLjrP2 SubeKZVsGB3kooO17UQaw+w+k39ohpUt49ZttyOIJJ/qUgDf8T87u834ynm11utsDi/G cq3pUUeZ60KDPQU7aZ6DlIqgJxxfM64WIqcaghFCSIkaPfmAH9EW/+y4Lyyg3td8lOGl q4S5FWz1M6OcTD+HC+2B+0Xa5Kqb2bmG3mXeAE21EdsgXGfIYS4IPo5wQj44fqSDEfxy 4MhUNF1rKBZROJjdhRVZAfki5jrbx18jvx5u7wKmHI8ksELsMtFYhFzyCsLK3qj2iZEd Ixqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=x7fD8Bmh26nt02YHJwhcRhN4e0s8pEo2QIZZOoounbs=; b=WuR9a55Q/9VeB3X6rA5sD4O5t0EI7bZnbdVo9XFF1HZ0VSLO7DTq8/1y/Lz36ru8yu 69J3+zAOceLRoKN+w8c0F58RaEcoDBZALt3w+Ur7pEQzFpDCIVJhrq4hO/WY2TdxPLOM PMYYt64Y0IevnERvLtlNnqJcVsVtUK81uEbcJRlKme7COmVj9KrwnzB5Ql15YMhYSV7t RjJFtLdrCTIWtjnK3Zsv9SAvoW49dP81glYF7GFeVJGS/FxRKZwVn3r81I62yr3rYSnK hU7MibIuYhU4pOLC6/nnFkmbtrhTCbsQ3K64UICVYzjYj+oh7tSpBQTkhIgvtS4P9jV0 zXjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l10si12694440pgm.20.2019.03.26.06.41.04; Tue, 26 Mar 2019 06:41:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731630AbfCZNkI (ORCPT + 99 others); Tue, 26 Mar 2019 09:40:08 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:57287 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726241AbfCZNkI (ORCPT ); Tue, 26 Mar 2019 09:40:08 -0400 Received: from localhost ([89.247.163.190]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M72Xn-1h30rq0kgx-008Ymi; Tue, 26 Mar 2019 14:39:41 +0100 Date: Tue, 26 Mar 2019 14:39:40 +0100 From: Andreas Klinger To: jic23@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] devantech-srf04.yaml: transform DT binding to YAML Message-ID: <20190326133938.oitfjxlx2kou26lm@arbad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Neo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UmPck1xlWLBzTQl8A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org devantech-srf04.yaml: yaml devicetree binding for iio ultrasonic proximity driver of devantech srf04 use devantech-srf04.txt, transform binding into yaml and remove the outdated DT documentation Signed-off-by: Andreas Klinger --- .../bindings/iio/proximity/devantech-srf04.txt | 28 ---------- .../bindings/iio/proximity/devantech-srf04.yaml | 59 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 28 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/proximity/devantech-srf04.txt create mode 100644 Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml diff --git a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.txt b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.txt deleted file mode 100644 index d4dc7a227e2e..000000000000 --- a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.txt +++ /dev/null @@ -1,28 +0,0 @@ -* Devantech SRF04 ultrasonic range finder - Bit-banging driver using two GPIOs - -Required properties: - - compatible: Should be "devantech,srf04" - - - trig-gpios: Definition of the GPIO for the triggering (output) - This GPIO is set for about 10 us by the driver to tell the - device it should initiate the measurement cycle. - - - echo-gpios: Definition of the GPIO for the echo (input) - This GPIO is set by the device as soon as an ultrasonic - burst is sent out and reset when the first echo is - received. - Thus this GPIO is set while the ultrasonic waves are doing - one round trip. - It needs to be an GPIO which is able to deliver an - interrupt because the time between two interrupts is - measured in the driver. - See Documentation/devicetree/bindings/gpio/gpio.txt for - information on how to specify a consumer gpio. - -Example: -srf04@0 { - compatible = "devantech,srf04"; - trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; - echo-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; -}; diff --git a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml new file mode 100644 index 000000000000..e7aab785c97d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/proximity/devantech-srf04.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Devantech SRF04 ultrasonic range finder + +maintainers: + - Andreas Klinger + +description: | + Bit-banging driver using two GPIOs: + - trigger-gpio is raised by the driver to start sending out an ultrasonic + burst + - echo-gpio is held high by the sensor after sending ultrasonic burst + until it is received once again + + Specifications about the driver can be found at: + http://www.robot-electronics.co.uk/htm/srf04tech.htm + +properties: + compatible: + items: + - const: devantech,srf04 + + trig-gpios: + description: + Definition of the GPIO for the triggering (output) This GPIO is set + for about 10 us by the driver to tell the device it should initiate + the measurement cycle. + maxItems: 1 + + echo-gpios: + description: + Definition of the GPIO for the echo (input) + This GPIO is set by the device as soon as an ultrasonic burst is sent + out and reset when the first echo is received. + Thus this GPIO is set while the ultrasonic waves are doing one round + trip. + It needs to be an GPIO which is able to deliver an interrupt because + the time between two interrupts is measured in the driver. + See Documentation/devicetree/bindings/gpio/gpio.txt for information + on how to specify a consumer gpio. + maxItems: 1 + +required: + - compatible + - trig-gpios + - echo-gpios + +examples: + - | + #include + proximity { + compatible = "devantech,srf04"; + trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; + echo-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; + }; -- 2.11.0