Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4222807img; Tue, 26 Mar 2019 05:34:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxe1uWB8kzoYfb5rZwBYfzf7aljRhIeW5CBEdqPpH8k4ArrynSGye50yHhs4Gq2KGFYO8VC X-Received: by 2002:a63:4847:: with SMTP id x7mr27719263pgk.233.1553603667058; Tue, 26 Mar 2019 05:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553603667; cv=none; d=google.com; s=arc-20160816; b=X5In9jEJv8w50AcxsEwBdqTa21hFAsFelBNfv8pCx8xH/znsrKyk/3M9Fxma/5QyHJ LV53k3sg8HBC53ovYaSUeoOo/+OpQr3Bu8aDZ/ODgBjvH9D5O+5SsD9fOm3jygz70/sU lx2lER2Wp6X4PA8pyjnqlD8y+6iHv4Qf2KOCoa+OdjdHTxo8sK6vS2+37zoIpzxFW5FX gehdpbTcb2hTL+tqT13Eu5KvMOPFWD3qt3R/ZzPF0ykGH41Q/S0izqBHcy3FOxp+Ev+K d+2nOyYpWi6rNX4MPLwJd2v063ROqOU9d58CSrjfzevx0Ic6nxgaLm0yIknIc/FSxUSD mH8Q== 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=pXLc9eNlz+n+XQZGA9THogKB3SNOcQttXfdRwRexs1U=; b=JAIBjZ0OOtYAhujj8uJo0xttDi0z96cStz7aueZnvjTX9LZi092bjc/m9cYmpzigy8 k9o+ItTu8JyvH/jAI1lkJ6/WoF5zIDbV73YJyI2b7YY/IKN4Hwj/pinrpPqjINu7sNJh ysXuGOKU1fcQ+ojBZwgME70UmvuocP5cy6O8XaV30rNIgHBOSVZktISntUGjb93ay4ez ISPKhScJdDggvPC3TKs/KELXEhYQ2w9k5nmEElfZ01Xy0mGwn3QEh8UhFf1x6c8kJueN Z7fiocVUIBrDFo1AiS9dhiibaz8OQ6aVgyGs66vJtmFo5t9qPiMSPJVCXa0KnuIib9jr zPAA== 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 61si16926352plq.154.2019.03.26.05.34.11; Tue, 26 Mar 2019 05:34:27 -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 S1731517AbfCZMbt (ORCPT + 99 others); Tue, 26 Mar 2019 08:31:49 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:47089 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbfCZMbt (ORCPT ); Tue, 26 Mar 2019 08:31:49 -0400 Received: from localhost ([89.247.163.190]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MUGNZ-1hYz6N1XzX-00RGvz; Tue, 26 Mar 2019 13:31:24 +0100 Date: Tue, 26 Mar 2019 13:31:23 +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 1/2] devantech-srf04.yaml: transform DT binding to YAML Message-ID: <20190326123121.ibe3olu3yxptauws@arbad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoM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08nkRHhrONgEIPY20ehDA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org use devantech-srf04.txt and transform binding into yaml Signed-off-by: Andreas Klinger --- .../bindings/iio/proximity/devantech-srf04.yaml | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml 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..cd065393b062 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml @@ -0,0 +1,62 @@ +# 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 + +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + +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