Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751817AbbDBURa (ORCPT ); Thu, 2 Apr 2015 16:17:30 -0400 Received: from spidey.rellim.com ([204.17.205.8]:60036 "EHLO spidey.rellim.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750797AbbDBUR2 (ORCPT ); Thu, 2 Apr 2015 16:17:28 -0400 X-Greylist: delayed 710 seconds by postgrey-1.27 at vger.kernel.org; Thu, 02 Apr 2015 16:17:28 EDT DKIM-Filter: OpenDKIM Filter v2.9.2 spidey.rellim.com t32K55mv013525 Message-Id: <201504022004.t32K4xbW013508@spidey.rellim.com> From: "Gary E. Miller" To: linux-kernel@vger.kernel.org Cc: "Gary E. Miller" Cc: "Rodolfo Giometti" Cc: "Ricardo Martin" s Cc: "James Nus" s Cc: "Jan Luebbe" Date: Thu, 2 Apr 2015 12:21:43 -0700 Subject: [PATCH] PPS: Restore lost capture-clear option to pps-gpio module. Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2080 Lines: 59 In the conversion from platform to device tree the capture-clear option was lost. capture-clear is needed so that time_pps_fetch() will report both edges of each PPS pulse. Both edges are needed so that userland programs, like gpsd, can autodetect the leading and trailing PPS edges. Signed-off-by: Gary E. Miller Fixes: c5dbcf8b70b5 ("pps-gpio: add device-tree binding and support") Cc: Ricardo Martins Cc: James Nuss Cc: Jan Luebbe Acked-by: Rodolfo Giometti > ---` --- Documentation/devicetree/bindings/pps/pps-gpio.txt | 2 ++ drivers/pps/clients/pps-gpio.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.txt b/Documentation/devicetree/bindings/pps/pps-gpio.txt index 40bf9c3..98f8898 100644 --- a/Documentation/devicetree/bindings/pps/pps-gpio.txt +++ b/Documentation/devicetree/bindings/pps/pps-gpio.txt @@ -10,6 +10,7 @@ Required properties: 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 clear edge Example: pps { @@ -17,4 +18,5 @@ Example: gpios = <&gpio2 6 0>; assert-falling-edge; + capture-clear; }; diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 333ad7d..dc4a71c 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -119,6 +119,8 @@ static int pps_gpio_probe(struct platform_device *pdev) if (of_get_property(np, "assert-falling-edge", NULL)) data->assert_falling_edge = true; + if (of_get_property(np, "capture-clear", NULL)) + data->capture_clear = true; } /* GPIO setup */ -- 2.3.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/