Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1378365imu; Tue, 11 Dec 2018 18:54:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/Udor4uMgt0TWK1L+A5iKu5tm6Uew/aePfBVzEEt1z0wrvBieXUMFZMtWmJdQn2pRH0o5oG X-Received: by 2002:a65:6491:: with SMTP id e17mr16645143pgv.418.1544583253302; Tue, 11 Dec 2018 18:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544583253; cv=none; d=google.com; s=arc-20160816; b=GSUwCAvkO2ovwecdlGdMtbrgUvMoDE6aDJwz+LCx6IaxpiANGmwMHdbxtwKrMG5TMo Z/4E/TWEs/A5fcsTdyieqEj1tTarrYRD3JlMY41TqAaQGk6gG/s2YQAkUvPBGE6UZqcz ak+8R0dtzsEEb0O5u6/Fvo4mmTK2yHbolWKtrDJU9EP/1Phsyre5KCm6L+EjhIvlIm0v q7LEwYiaEye6GjxB+4iEHtmFIfv/Vvxzj5a9uL33Y9BxSZ1lfebLakl2bX8Ek/xetjoJ dvauzh/Pf6OC5iPhNRhKd4kcSlqOVKo+8PJ7eFTDJfgpmeFRnO+YbPfiGXR4RxZEtDAo 1hJw== 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=0lNdTy+qcZvmxkFsYDL0mr6+wwOxPU/qWdqWPdSXNWo=; b=xHdNTNAP2Xeaujq/GoG7i8jS6mwysTVwoRvU0AwptaxwSJvFAo3Z7fAif3Kf934aoa JGmGJKpRtHzIkD+ewBpe8BhBHgf6Lj9zoXJD3OLKGkwRGtsvGQXtTqC4ZIpMBwiMNtiN iBzohMxO21PEi4sIQZjNKW1G8GCKrCltyUH0IrdWbLNZf6DYt/i5dqeZMrNBCT8z0LBo 3jfvF/7kAXzTzCxc5Z06TSfKULUXAMFKfYb4Ck5q28mXbo/XjJgBfOAOjP5rPk6Lr3eu 4qrhPLSOktrHir/bxAe+nF884XFo+lWJNYaw3XVpYZL8Q4U5pu7jNkWlQT0LAbISPXfw wV3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@aussec.com header.s=2016 header.b=T6XQsImF; 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 b2si13207612pgh.475.2018.12.11.18.53.57; Tue, 11 Dec 2018 18:54:13 -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=T6XQsImF; 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 S1726253AbeLLCxH (ORCPT + 99 others); Tue, 11 Dec 2018 21:53:07 -0500 Received: from csm1.csm-office.com.au ([165.228.118.109]:55146 "EHLO sleepy.aussec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbeLLCxH (ORCPT ); Tue, 11 Dec 2018 21:53:07 -0500 X-Virus-Scanned: amavisd-new at aussec.com Received: from localhost.localdomain ([1.128.224.233]) (authenticated bits=0) by sleepy.aussec.com (8.15.2/8.15.2) with ESMTPSA id wBC2qbuW002983 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 12 Dec 2018 13:52:58 +1100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aussec.com; s=2016; t=1544583178; bh=FhsddhCi9/OHvKmc8JUyFk+r/Lpit9Bh5oZd+joP0Ew=; h=From:To:Cc:Subject:Date; b=T6XQsImFF5zFntTeSI41HBMl0+fkGK9S82AzdhpppWoMe9BwtZ1A+7yKN6MAgPRpp k401npNWlzUvSe2IwoDK2TwnN8t96PkChcgHAInl1mx2VXGXLydRjmPDYgAtbPIj91 ESZyT8u5teqmVu4ab0fOMRAZGLr/+aZ9EeMaEcti+QtbftlXijQRtoEyohXuz9L73Y MjpteVDz5hwxLui1D/rSpnrhyXIhQOr1pxym72CjgR7/Pb4mZGGPiTWn5T8oP2NCtK /S4bC5VIEo1x2P3K6/69Yv8xsIB502+Bd3TSNp5v/URcU3xou0+ZkHdlRPrql8qsiM kPvtLnCmPT3+w== From: Tom Burkart To: Linux kernel mailing list Cc: Tom Burkart Subject: [PATCH v12 0/3] PPS: pps-gpio PPS ECHO implementation Date: Wed, 12 Dec 2018 13:52:11 +1100 Message-Id: <20181212025214.29911-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) 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 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 | 159 ++++++++++++++++----- include/linux/pps-gpio.h | 5 +- 3 files changed, 131 insertions(+), 40 deletions(-) -- 2.12.3