[LinuxPPS] [PATCH 1/2] pps: capture-clear documentation & extraction, typo fix

tom burkart tom at aussec.com
Mon Sep 24 05:51:47 CEST 2018


Looks like the original message got munged...

----- Forwarded message from tom at aussec.com -----
     Date: Mon, 24 Sep 2018 13:35:44 +1000
     From: Tom Burkart <tom at aussec.com>
  Subject: [PATCH 1/2] pps: capture-clear documentation & extraction, typo fix
       To: LinuxPPS discussions <discussions at linuxpps.org>
       Cc: lukas at fridolin.com, Tom Burkart <tom at aussec.com>

This patch adds documentation for the device tree capture-clear option,
device tree capture-clear extraction and a change in error message to
be more explicit.

Signed-off-by: Tom Burkart <tom at aussec.com>
---
  Documentation/devicetree/bindings/pps/pps-gpio.txt | 1 +
  drivers/pps/clients/pps-gpio.c                     | 5 ++++-
  2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.txt  
b/Documentation/devicetree/bindings/pps/pps-gpio.txt
index 3683874832ae..60d3b6e1957d 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 PPS clear event

  Example:
  	pps {
diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
index 333ad7d5b45b..78d8fbbb4733 100644
--- a/drivers/pps/clients/pps-gpio.c
+++ b/drivers/pps/clients/pps-gpio.c
@@ -119,6 +119,9 @@ 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 */
@@ -131,7 +134,7 @@ static int pps_gpio_probe(struct platform_device *pdev)

  	ret = gpio_direction_input(data->gpio_pin);
  	if (ret) {
-		dev_err(&pdev->dev, "failed to set pin direction\n");
+		dev_err(&pdev->dev, "failed to set pin as input\n");
  		return -EINVAL;
  	}

--
2.12.3



----- End forwarded message -----



Kind regards,

Tom Burkart
Consultant

AUSSEC Mob: 04 1768 2202 Fax: 02 9526 1230
30 Waterside Crs, Carramar NSW 2163




More information about the discussions mailing list