Skip to contentSkip to conversation

dt-bindings: pps: pps-gpio.txt: Add capture-clear

PATCH In review Adrian Bunk 3 participants 4 messages Mar 11, 2019 – Mar 28, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: pps: pps-gpio.txt: Add capture-clear

The code was already there but the device tree wiring was missing.

---
 Documentation/devicetree/bindings/pps/pps-gpio.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pps/pps-gpio.txt +1 -0
index 3683874832ae..bb69b8dc7a82 100644
@@ -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 {
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 pps-gpio.c: Add capture-clear

The code was already there but the device tree wiring was missing, resulting in out-of-tree patches enabling it in various places.

This is safe to backport since it only has an effect if enabled in the device tree.

---
 drivers/pps/clients/pps-gpio.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pps/clients/pps-gpio.c +2 -0
index dd5d1103e02b..f6549c4c9c81 100644
@@ -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 */
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH 2/2] pps-gpio.c: Add capture-clear

Quoted 6 lines · Adrian Bunk

The code was already there but the device tree wiring was missing, resulting in out-of-tree patches enabling it in various places.

This is safe to backport since it only has an effect if enabled in the device tree.

That describes every single patch adding DT support... It may be safe to backport, but it's not stable material IMO.

You may want to send this to some other list besides the DT list if you want it applied.

Quoted 5 lines
---
 drivers/pps/clients/pps-gpio.c | 2 ++
 1 file changed, 2 insertions(+)
maintainer Acked-by on v1 1/2
#3 lore raw
In reply to Adrian Bunk
Quoted 1 line · Adrian Bunk

The code was already there but the device tree wiring was missing.

But patch 2 adds the code...

Quoted 3 lines

This is not stable material IMO.

Quoted 3 lines
---
 Documentation/devicetree/bindings/pps/pps-gpio.txt | 1 +
 1 file changed, 1 insertion(+)

This was discussed at length recently. I still think this is working around a limitation in the GPIO/interrupt code, but I'm not going to argue more about a single property for a single binding.

With stable dropped: