Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp1547873ima; Sat, 2 Feb 2019 03:00:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN7nmQ8JmYB7aCq1YdV1rw+fhCyfvmsaAh4CEb9l5Gk2fgyT3EQm4bqzyYz9nhdxauA60j4V X-Received: by 2002:a62:60c5:: with SMTP id u188mr43334210pfb.4.1549105229711; Sat, 02 Feb 2019 03:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549105229; cv=none; d=google.com; s=arc-20160816; b=sb5fzFGFPPqckukeHinBKSz+AFT1XHrDcTElYy2fkhqqu3AhNaXy5Unc9kw14Oie2D 5gdCTDgBpOhVrnkMdpmZISf7n+GihAWua3aZb6TFTiVYuPvp9Jw2hMuEzm5Czxp1a/N3 6JqjrbcwLnM7Z+3OL4JuIbEUIEZpCngf7xLuYpOdS+5/KtNpc3sbss93ICFw5gAH8sWJ ZvSHvWNdciy9v68bPrKeD6YDhykY0wefp3511h+ro6USHmxNW0egWtBPrpLDOwN65SGu PLC97FkaUtd5SxC8yge45imUgBh4M2pC0RAZYkcvHPOz0BfZDZiDm8K6/g5lebq23YrV 9HNQ== 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=rH0DFstfS1vuUeAmel+7nEEOuLkprBWW7KK5NVJ4Zok=; b=I9+UeXNpnNKqn/Dpzdueq1n5jKYvzZ2dltI/J7zF7HFtO6YZD9tq+2gKSSj142JRry T1cvxb97UHtbN91MBBQeQmuuDMT0W0fcF4OKUa37Owat+UxKlebY7Dw5KoTg08BPxl4P 9nNHIzZXq9K4voYA0c/gLiQOe2e0P01aSHJM/FJKS/HKrTNoC7jJk1RgKeg3VxXbF1mM a8pys2CtBCZYama2BQ7H7W/0j5yfv3ftVF2X2Q3IzOCDMYYudxUEkR8XkdLlCQqDyDr4 I8O7G51mNkZ3isPRPsLLZMn8nazhnXhQFPHqhKGuj6AVE5WqeVvJJNs1QmhHd9H7hh5y gnag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@aussec.com header.s=2016 header.b=aoDI0mr+; 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 o21si9412301pgj.415.2019.02.02.03.00.14; Sat, 02 Feb 2019 03:00:29 -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=aoDI0mr+; 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 S1727764AbfBBK7o (ORCPT + 99 others); Sat, 2 Feb 2019 05:59:44 -0500 Received: from csm1.csm-office.com.au ([165.228.118.109]:40228 "EHLO sleepy.aussec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbfBBK7n (ORCPT ); Sat, 2 Feb 2019 05:59:43 -0500 X-Virus-Scanned: amavisd-new at aussec.com Received: from localhost.localdomain ([1.128.141.87]) (authenticated bits=0) by sleepy.aussec.com (8.15.2/8.15.2) with ESMTPSA id x12AwsV7016455 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 2 Feb 2019 21:59:10 +1100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aussec.com; s=2016; t=1549105153; bh=dsIY0n+z8orwZrNC/8i7HWh9FmtUCCnNinT4nrbqufM=; h=From:To:Cc:Subject:Date; b=aoDI0mr+S9+OfQZExOmBK8kHu0/PA09TvF+noIakR88So5/cT2Bem/fd9HU531R5p 2DvorC/Ug9JpEvoVanNr+GbJw+rJDN5oxNdifeOF+LiZX4B1XO0r8G3Gvu90UdhVe4 oLD8RT1Nh6RcP3X+TjZiXeKYH+7z+34AIOvgvG6wiBFsjSDcoEpvz9UG3sGSP5aCL/ mZydw6+zJh2sUtRJ9iSRdG6yBhiDymh4jwj4VU1CTF0hib+ZMHsHEZUCm5750iSVy/ SEhxMeoKJ5yWihd035egKOe0eHmG6AoTYX2ZfhOyqlz5wGwFhhfE+W5R/cB2D75mvU KVyZkz+vHywdA== From: Tom Burkart To: Linux kernel mailing list Cc: Tom Burkart , Rodolfo Giometti , Ricardo Martins , James Nuss Subject: [PATCH v15 0/3] PPS: pps-gpio PPS ECHO implementation Date: Sat, 2 Feb 2019 21:57:21 +1100 Message-Id: <20190202105724.4743-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 API to the descriptor based API. 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 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/3) Change in v11: Change requested by Rob Herring: All changes in regard to the capture-clear DT entry are gone. Change in v12: Change requested by Rob Herring: Deleted superfluous use of invert-pps-echo Change in v13: Patch 2/3 (DT bindings) now reviewed. Thanks a lot, Rob! Changes in v14: Simplify code enabling PPS ECHO functionality. Changes in v15: Changes requested by Rodolfo Giometti. 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 | 7 + drivers/pps/clients/pps-gpio.c | 153 ++++++++++++++++----- include/linux/pps-gpio.h | 5 +- 3 files changed, 125 insertions(+), 40 deletions(-) -- 2.12.3