545dc555a1b8fa1e7915830704c7cce6cfb467a4
[openwrt/staging/aparcar.git] /
1 From 61ad2796b48891e5a3e52d290cb51a44259b5799 Mon Sep 17 00:00:00 2001
2 From: hdoverobinson <hdoverobinson@gmail.com>
3 Date: Tue, 13 Mar 2018 06:58:39 -0400
4 Subject: [PATCH 247/454] added capture_clear option to pps-gpio via dtoverlay
5 (#2433)
6
7 ---
8 arch/arm/boot/dts/overlays/README | 5 ++++-
9 arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 1 +
10 drivers/pps/clients/pps-gpio.c | 3 +++
11 3 files changed, 8 insertions(+), 1 deletion(-)
12
13 --- a/arch/arm/boot/dts/overlays/README
14 +++ b/arch/arm/boot/dts/overlays/README
15 @@ -1287,7 +1287,10 @@ Info: Configures the pps-gpio (pulse-p
16 Load: dtoverlay=pps-gpio,<param>=<val>
17 Params: gpiopin Input GPIO (default "18")
18 assert_falling_edge When present, assert is indicated by a falling
19 - edge, rather than by a rising edge
20 + edge, rather than by a rising edge (default
21 + off)
22 + capture_clear Generate clear events on the trailing edge
23 + (default off)
24
25
26 Name: pwm
27 --- a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts
28 +++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts
29 @@ -33,5 +33,6 @@
30 <&pps_pins>,"brcm,pins:0",
31 <&pps_pins>,"reg:0";
32 assert_falling_edge = <&pps>,"assert-falling-edge?";
33 + capture_clear = <&pps>,"capture-clear?";
34 };
35 };
36 --- a/drivers/pps/clients/pps-gpio.c
37 +++ b/drivers/pps/clients/pps-gpio.c
38 @@ -119,6 +119,9 @@ static int pps_gpio_probe(struct platfor
39
40 if (of_get_property(np, "assert-falling-edge", NULL))
41 data->assert_falling_edge = true;
42 +
43 + if (of_get_property(np, "capture-clear", NULL))
44 + data->capture_clear = true;
45 }
46
47 /* GPIO setup */