Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp226208imu; Mon, 26 Nov 2018 20:09:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xxql9PJbdjw8AAsPoTjnVPHvAtGG/NNkW65hOCPIbLUfrcNmJ6u86YL1LoCS2tNlYAf0aX X-Received: by 2002:a63:36c4:: with SMTP id d187mr27292918pga.404.1543291754903; Mon, 26 Nov 2018 20:09:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543291754; cv=none; d=google.com; s=arc-20160816; b=ktsAz0RPKDEbNIjgl3dwaakgQwx/nBWyKJekaKIUy0u4lFKph7kAtzq/oZWBJFwNO9 QM3E0iRaXx/bFLtPEaJXglWn1GpxgR7EGwogQ0Lkm5Ydfkm2FhmmVRCX631MiSu5OFcg 8j4qv0t4lm9kGmpHhQyKMMnKKBO/7t2+v+DDbs+YkVl75P9jE42Q7C4QBb+pQtW79XOl s5qSwsmZim7SXYF8SUrvuW/jkwghTMnd6J4yNAYuidL5xSi3EuN5eCRvLDyXa2ee/BhR ErPSIZ/dPpy/q0kUayxgRmOvfSynwFqLyWVpMakaFVK1SKsQ+BmKz1Ufpoeduhhjclv0 ylqw== 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-transfer-encoding :content-disposition:mime-version:in-reply-to:references:subject:cc :to:from:date:message-id; bh=x07kgeDheLG37m5a4749tDGfUXebh2bzhSub8stOl7Q=; b=HGjbP4XJ4WfCvqJfgX2kkbt/98S0ULuT20tvX5CfQ24xuFAw86nIfPjdnxwCHhPcNM Z3ELIxR+AVaZS2nLEsLWEDnR/2rObgIyp3ao2x2s4tpoC9bHIX/5ArNkX/28EejI9HHX 4M/vPRhqo84GG662vMmBDhG03GjbRC5gRxqkxlKQF0kDSsmQwwUygmaX6yx2+XBOGFbY zL1INhHr57yaAufz+uUSXJ9ML6nZ0QbWXkNrMUPpx7If8TofklLAzt4Myjme4HsYCD8u EfVgFo1VwiwJlB6z+pkknJo06l/905oV3QIFl7k7fJr/+OeCoa2yBn652RtDU2Jt4w9Q 1aWw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aussec.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si2277000pgi.314.2018.11.26.20.08.59; Mon, 26 Nov 2018 20:09:14 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aussec.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728358AbeK0PDW (ORCPT + 99 others); Tue, 27 Nov 2018 10:03:22 -0500 Received: from csm1.csm-office.com.au ([165.228.118.109]:58174 "EHLO sleepy.aussec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727637AbeK0PDW (ORCPT ); Tue, 27 Nov 2018 10:03:22 -0500 X-Virus-Scanned: amavisd-new at aussec.com Received: from sneezy.aussec.com (sneezy.aussec.com [172.16.0.4]) by sleepy.aussec.com (8.15.2/8.15.2) with ESMTP id wAR46YAO023345; Tue, 27 Nov 2018 15:06:39 +1100 Received: from csm3.csm-office.com.au (csm3.csm-office.com.au [172.16.0.11]) by aussec.com (Horde Framework) with HTTP; Tue, 27 Nov 2018 15:06:29 +1100 Message-ID: <20181127150629.10795h1esqtc53ut@aussec.com> Date: Tue, 27 Nov 2018 15:06:29 +1100 From: tom burkart To: Rob Herring Cc: "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, lukas@fridolin.com Subject: Re: [PATCH v9 3/4] dt-bindings: pps: pps-gpio PPS ECHO implementation References: <20181122094602.5156-1-tom@aussec.com> <20181122094602.5156-2-tom@aussec.com> <20181122094602.5156-3-tom@aussec.com> <20181122094602.5156-4-tom@aussec.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.9) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Quoting Rob Herring : > On Thu, Nov 22, 2018 at 3:49 AM Tom Burkart wrote: >> >> This patch implements the device tree changes required for the pps >> echo functionality for pps-gpio, that sysfs claims is available >> already. >> >> This patch was originally written by Lukas Senger as part of a masters >> thesis project and modified for inclusion into the linux kernel by Tom >> Burkart. >> >> Signed-off-by: Lukas Senger >> Signed-off-by: Tom Burkart >> --- >> Documentation/devicetree/bindings/pps/pps-gpio.txt | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.txt >> b/Documentation/devicetree/bindings/pps/pps-gpio.txt >> index 1155d49c2699..e09f6f2405c5 100644 >> --- a/Documentation/devicetree/bindings/pps/pps-gpio.txt >> +++ b/Documentation/devicetree/bindings/pps/pps-gpio.txt >> @@ -7,10 +7,15 @@ Required properties: >> - compatible: should be "pps-gpio" >> - gpios: one PPS GPIO in the format described by ../gpio/gpio.txt >> >> +Additional required properties for the PPS ECHO functionality: >> +- echo-gpios: one PPS ECHO GPIO in the format described by ../gpio/gpio.txt >> +- echo-active-ms: duration in ms of the active portion of the echo pulse >> + >> Optional properties: >> - assert-falling-edge: when present, assert is indicated by a falling edge >> (instead of by a rising edge) >> - capture-clear: when present, also capture the PPS clear event >> +- invert-pps-echo: when present, invert the PPS ECHO pulse > > Why do you need this? Can't you just make the echo gpio GPIO_ACTIVE_LOW? > > BTW, using the flag probably should have been done for > 'assert-falling-edge' as well. The hardware I use expects a positive-going echo pulse, however, it was really easy to give users the option to have it inverted in case they use different hardware that expects a negative-going edge. I may well be needing this option myself if I find that the GPS I am using produces better results for negative-going edges than positive-going edges. Tom