added capture_clear option to pps-gpio via dtoverlay (#2433)
authorhdoverobinson <hdoverobinson@gmail.com>
Tue, 13 Mar 2018 10:58:39 +0000 (06:58 -0400)
committerPhil Elwell <pelwell@users.noreply.github.com>
Tue, 13 Mar 2018 10:58:39 +0000 (10:58 +0000)
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/pps-gpio-overlay.dts
drivers/pps/clients/pps-gpio.c

index 4206ba887304f951b68cc7817a51ff38bcd20571..a996e71a158ce44ed53625652455ad8624f539aa 100644 (file)
@@ -1261,7 +1261,10 @@ Info:   Configures the pps-gpio (pulse-per-second time signal via GPIO).
 Load:   dtoverlay=pps-gpio,<param>=<val>
 Params: gpiopin                 Input GPIO (default "18")
         assert_falling_edge     When present, assert is indicated by a falling
-                                edge, rather than by a rising edge
+                                edge, rather than by a rising edge (default
+                                off)
+        capture_clear           Generate clear events on the trailing edge
+                                (default off)
 
 
 Name:   pwm
index 9ee4bdfa6167355e82d7f8229613f29478caf4ee..af29b870f1a185c0b7f02f3d6e4defaf57f97774 100644 (file)
@@ -33,5 +33,6 @@
                          <&pps_pins>,"brcm,pins:0",
                          <&pps_pins>,"reg:0";
                assert_falling_edge = <&pps>,"assert-falling-edge?";
+               capture_clear = <&pps>,"capture-clear?";
        };
 };
index 333ad7d5b45bf34c76ce4c7a0a8e4e703e83d3f0..ec9c4de480708492eaf5e61a7c30e7b7542c5164 100644 (file)
@@ -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 */