diff options
author | John Klug <john.klug@multitech.com> | 2016-09-16 19:09:44 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2016-09-16 19:09:44 -0500 |
commit | 7b2a7f439afd405710447cefa716db1d8d20a156 (patch) | |
tree | b214f299e8b34f995b0a4e460ffe697944f146a3 | |
parent | a0b1870ed5614f9dbb500ab846d0a4c987248fa0 (diff) | |
download | meta-multitech-7b2a7f439afd405710447cefa716db1d8d20a156.tar.gz meta-multitech-7b2a7f439afd405710447cefa716db1d8d20a156.tar.bz2 meta-multitech-7b2a7f439afd405710447cefa716db1d8d20a156.zip |
Patch pps-gpio so that clear is detected.
-rw-r--r-- | recipes-kernel/linux/linux-3.12.27/linux-3.12-pps-gpio.patch | 34 | ||||
-rw-r--r-- | recipes-kernel/linux/linux_3.12.27.bb | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-3.12.27/linux-3.12-pps-gpio.patch b/recipes-kernel/linux/linux-3.12.27/linux-3.12-pps-gpio.patch new file mode 100644 index 0000000..ff30650 --- /dev/null +++ b/recipes-kernel/linux/linux-3.12.27/linux-3.12-pps-gpio.patch @@ -0,0 +1,34 @@ +# +# Author: Gary Miller +# https://groups.google.com/forum/#!topic/linux.kernel/fj1NGMrfGW8 +# +# 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. +# +==================================================================== +diff -uprN old/Documentation/devicetree/bindings/pps/pps-gpio.txt new/Documentation/devicetree/bindings/pps/pps-gpio.txt +--- old/Documentation/devicetree/bindings/pps/pps-gpio.txt 2016-09-16 18:22:31.149632690 -0500 ++++ new/Documentation/devicetree/bindings/pps/pps-gpio.txt 2016-09-16 18:27:02.981632115 -0500 +@@ -17,4 +17,5 @@ Example: + gpios = <&gpio2 6 0>; + + assert-falling-edge; ++ capture-clear; + }; +diff -uprN old/drivers/pps/clients/pps-gpio.c new/drivers/pps/clients/pps-gpio.c +--- old/drivers/pps/clients/pps-gpio.c 2016-09-16 18:23:45.661632532 -0500 ++++ new/drivers/pps/clients/pps-gpio.c 2016-09-16 18:29:20.257631825 -0500 +@@ -119,6 +119,8 @@ static int pps_gpio_probe(struct platfor + + 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 */ diff --git a/recipes-kernel/linux/linux_3.12.27.bb b/recipes-kernel/linux/linux_3.12.27.bb index aec6e54..42d1171 100644 --- a/recipes-kernel/linux/linux_3.12.27.bb +++ b/recipes-kernel/linux/linux_3.12.27.bb @@ -25,6 +25,7 @@ COMMON_PATCHES = " \ file://linux-3.12-release-rfcomm-port-fix.patch \ file://linux-3.12-spi-atmel-dma-min.patch \ file://linux-3.12.27-USB-option-reduce-interrupt-urb-logging-verbosity.patch \ + file://linux-3.12-pps-gpio.patch \ " SRC_URI_append_mtcdt = "\ |