Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1842940imu; Wed, 28 Nov 2018 16:27:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/VUM1zqbNhjbE2Um2rlkN8o1mlSGUPX52Gidds+tHo8Bq5ue45qgbM9FNF/oDGYVk3ADErD X-Received: by 2002:a62:c613:: with SMTP id m19mr20894423pfg.207.1543451276660; Wed, 28 Nov 2018 16:27:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543451276; cv=none; d=google.com; s=arc-20160816; b=O/s10NYSBsPzmNU7NAXN7bCSn7P02sEQXoWOqJmbXvn0b1r9XFHcmJAWyvkB0ylv9h i4QwSMfu4HBtjY19nDP+/CT4W9muBQv+ghUwOHiwIzfIf27ZbnYVpxJ9xtnUumVap9yx Dsvi005+k0xcQmLW0rW+rR63U7KpFx5cUjmk9FVULAkTwKPSNPU6vW2NOAAOAIiWWgFv 5RTFnuJOIpAOTm0RhPjF5WnIhPyqNIoSUW9upwyFRbOkKJfxOPL3ywELscStzjVmZoqI 7JaJaWsSfDJoa7vZ+g+Xa0HLBqy3Wr09aIhL2F3IpoXwrCn38eshUTW6dFbFlABiSLUz h0+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=kPEm/VX48CswcWIB2B2qi8PnplLxhffY2Y8xMnVbVew=; b=rB2zRl8iYmfQvOuysyjngyUWrQ42vKGI0eTxBWXvOqSOmozhCLa7b1UcczQp2oTwLC Pdr4WK9r52+WhV7HR4qZdHYouAw0iPj1qrLQtOxvx4TCdpFBD6S/dBY5IdHK5/hFvlwx J2p6PLxYcgw1RxvTTRlmz+td/qim/vheVRvzzJcBDo9LCtovAoeRh9Z2nSdfMd+NclCD TYDFb4jofFx8XEOI/TDfRAAlraCU75yG9se6F8eh6aV66lj4W9dB32ge1ccAZa5ZueWV Ck3O6M4l/f+R1tG/lu9k0RWCCKJQCQ6jmU7P/HLnhZ3wLI91u8Z1V/231R4JfJeTkSKS WdBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@aussec.com header.s=2016 header.b=GYeq+ruh; 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 o89si216674pfk.223.2018.11.28.16.27.41; Wed, 28 Nov 2018 16:27:56 -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; dkim=fail header.i=@aussec.com header.s=2016 header.b=GYeq+ruh; 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 S1727044AbeK2Lac (ORCPT + 99 others); Thu, 29 Nov 2018 06:30:32 -0500 Received: from csm1.csm-office.com.au ([165.228.118.109]:41382 "EHLO sleepy.aussec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726668AbeK2Lac (ORCPT ); Thu, 29 Nov 2018 06:30:32 -0500 X-Virus-Scanned: amavisd-new at aussec.com Received: from hpdv6.aussec.com.com (c110-21-61-29.farfl4.nsw.optusnet.com.au [110.21.61.29]) (authenticated bits=0) by sleepy.aussec.com (8.15.2/8.15.2) with ESMTPSA id wAT0QZ3R025194 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 29 Nov 2018 11:26:55 +1100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aussec.com; s=2016; t=1543451215; bh=XAzu4O8ujMbP04ePHe2TGZD2glGDqDP4mjaTCDWGL8w=; h=From:To:Cc:Subject:Date; b=GYeq+ruhfWe1u0zCwGnk2QXcY0FdqQ/Nxseg/zBM+LKC5uAmIwLNXoPLHrDVIlQkK yymhgjtAUbVGCs1nOslj59m0e8Srre/ldgXggcRvxZnCsCX60J9wBDLlVaT2l6Dk55 tilysfmIzbuqev6pW0goqNWVqsiUHqBEbwfN6expV9NQW2sokE8gOyxCn3HflW5g8z 6jfEwYt21nLGF9n8DG2twfc/onlwtYU/OcUMo2PZvo1/DgeTwi7H0q344A3mHDMzHb C69zKU20ojqDzHD0NPlwjhYBs7IRthGtvXLfE3Jh3kB2lUEnwSKFQwIdSscgD0nFPy D/0Se7DDI4gMQ== From: Tom Burkart To: Linux kernel mailing list Cc: Tom Burkart Subject: [PATCH v11 0/3] PPS: pps-gpio PPS ECHO implementation Date: Thu, 29 Nov 2018 11:26:23 +1100 Message-Id: <20181129002626.5410-1-tom@aussec.com> X-Mailer: git-send-email 2.12.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, please find attached the PPS-GPIO PPS ECHO implementation patch. The driver claims to have echo functionality in the sysfs interface but this functionality is not present. This patch provides this functionality. Part 1 of the patch change the original driver from the number based GPIO ABI to the descriptor based ABI. Parts 2 and 3 then add the PPS ECHO functionality. This is enabled if a "echo-gpios" entry is found in the devicetree. Changes in v8: Changes requested by Rob Herring and Philipp Zabel: DT explanation and don't change the DT entry for the PPS gpio. Changes in v9: Simplify "if" expression by doing echo_active_ms validation earlier. Changes in v10: Changes requested by Philipp Zabel: Mostly cosmetic changes: PATCH 2/4 now reviewed. Thanks a lot, Philipp! (Please note that as of v11 PATCH 1 is gone so this has become PATCH 1) Changes in v11: Changes requested by Rob Herring: All changes in regard to the capture-clear DT entry are gone. On the linuxpps mailing list it was suggested to use a hrtimer for resetting the GPIO ECHO active state to the inactive state. Please also comment on whether a hrtimer is necessary/desirable for the purpose of resetting the echo pin active state. I am happy to implement it if this is useful/desirable. Please install, test and comment as it is now a quite major change to the driver. Suggestions for improvement are welcome. Tom Burkart Tom Burkart (3): pps: descriptor-based gpio dt-bindings: pps: pps-gpio PPS ECHO implementation pps: pps-gpio pps-echo implementation Documentation/devicetree/bindings/pps/pps-gpio.txt | 9 ++ drivers/pps/clients/pps-gpio.c | 167 ++++++++++++++++----- include/linux/pps-gpio.h | 6 +- 3 files changed, 142 insertions(+), 40 deletions(-) -- 2.12.3