Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4244671img; Tue, 26 Mar 2019 06:00:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIsndaDp3u58XtuLkeymLzwGTIjQ6yOX+yxZQ7WUVYOmgjWXsWjIwpyBVRmPT5Vtogez2D X-Received: by 2002:a17:902:681:: with SMTP id 1mr31579260plh.31.1553605236083; Tue, 26 Mar 2019 06:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553605236; cv=none; d=google.com; s=arc-20160816; b=O3jXhAoJ9oNzYQxSy84vcCj6wWXp1XdNnRhOIfqrqjB08phvRI/q2c7UXa0dkY+XjK FD4cDIZWleYCuzKCQ1pdSI44J+jqglGiBvcq2Wtr24FFsb7nE8Wrd5Wy2PuWBLKZjvN1 OV/XoslC6GPmmhCEZITAHGVvYznzNyvSc9I2/GrNBt6ZZRE2uM24tnABoDn24uZYTs32 35VgzeqdYz8V/xS3Etfa/n8pTuD50KnNKW4UYjqL+seI8U3gHUTFCWBNhy2Zrwh7VpYg XR634RP4AggST2pBGLOo3DPgU9sEPrVwkyEW6RYs94tkK7IUM7OeVHIQpwKO9cKTl3hq dpgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XeHbFrioCGbMsxF0q7Cj6NUL2wHmLsRbOm2vwsucb2g=; b=N4dm1PmYt8rUAz/l6IW5GH0yJroSPNEK+WgIRrHeltB1ivdLg0y6GWTOSV1DwHUMy8 Mp2L8AWJw1QF+B6bMRAga/EBCREk2wwlCSqQkauOS9oP2LUy//C4y8hCHORzRxKzZHOa YQYWItj23Afxc4d6L3llLy05TlaZtIQLvIxPnebhwFb02mKnpcL8C1eVmmZZ4A3sWRnO 4h4+h+GtY2d+/hoDRteH//lPydX+IUEH2uk2UhtKFztHOf8pXUBC+Io72Ro3I7fE4YW3 CxFlPEU5bn/wQcvr3eFcIO2UTGlPR9nz7ez8LQkflD4LqBs0qpapggrafHJNW6BiA7hs VKrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uJmjm5Io; 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; dmarc=pass (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 75si15796433pgb.230.2019.03.26.06.00.20; Tue, 26 Mar 2019 06:00:36 -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; dkim=pass header.i=@kernel.org header.s=default header.b=uJmjm5Io; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731374AbfCZM63 (ORCPT + 99 others); Tue, 26 Mar 2019 08:58:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:34630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbfCZM63 (ORCPT ); Tue, 26 Mar 2019 08:58:29 -0400 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EF8CE20879; Tue, 26 Mar 2019 12:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553605108; bh=jkPL84ue2AseSFDDn3sETNJ+7t0GUkREXhNb9O60bpA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uJmjm5IoZJwmOtH1IkLK9wTcIXcM6z7+MlsGydjQir1lkzqWTiWnaWPypPst/vz6k F+/l2FuQTEv1VfaHHDZOfGux4YrSafawhjNQKQdRr8XxsSshO2+EBerjCCw266XRLL Zksa/grSBvy/7DXM1HX0qY0i76fme256mvyUg6Dc= Received: by mail-qk1-f169.google.com with SMTP id o129so7487428qke.8; Tue, 26 Mar 2019 05:58:27 -0700 (PDT) X-Gm-Message-State: APjAAAWhzdC4xrSKbye/VN1F+IgZ7STsq275P7iF+deyNbu90SR3lVru GSqQNw5Is4B2dnVEALucuupuW+Wm5xdX8fxj2Q== X-Received: by 2002:a37:4a12:: with SMTP id x18mr23396589qka.184.1553605107103; Tue, 26 Mar 2019 05:58:27 -0700 (PDT) MIME-Version: 1.0 References: <20190326123121.ibe3olu3yxptauws@arbad> In-Reply-To: <20190326123121.ibe3olu3yxptauws@arbad> From: Rob Herring Date: Tue, 26 Mar 2019 07:58:14 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] devantech-srf04.yaml: transform DT binding to YAML To: Andreas Klinger Cc: Jonathan Cameron , Mark Rutland , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , "open list:IIO SUBSYSTEM AND DRIVERS" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 7:31 AM Andreas Klinger wrote: > > use devantech-srf04.txt and transform binding into yaml I'd just collapse these into 1 patch. > > 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# This doesn't belong. It's not a I2C bus controller. > + > +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