[PATCH 4/5] dt-bindings: pps: pps-gpio: introduce pulse-width properties

Eliav Farber posted 5 patches 2 years, 7 months ago
[PATCH 4/5] dt-bindings: pps: pps-gpio: introduce pulse-width properties
Posted by Eliav Farber 2 years, 7 months ago
Add two new optional properties to calculate PPS pulse-width in nano
seconds:
 - assert-pulse-width
 - clear-pulse-width

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 Documentation/devicetree/bindings/pps/pps-gpio.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.txt b/Documentation/devicetree/bindings/pps/pps-gpio.txt
index 8d588e38c44e..9ecfd5fb3b63 100644
--- a/Documentation/devicetree/bindings/pps/pps-gpio.txt
+++ b/Documentation/devicetree/bindings/pps/pps-gpio.txt
@@ -18,6 +18,12 @@ Optional properties:
                  opposite of the assert edge (if assert is rising-edge then
                  clear is falling-edge and if assert is falling-edge then
                  clear is rising-edge).
+- assert-pulse-width: when present, assert pulse width will be calculated in
+                      nano seconds.
+                      It should be enabled only if 'capture-clear' is enabled.
+- clear-pulse-width: when present, clear pulse width will be calculated in
+                     nano seconds.
+                     It should be enabled only if 'capture-clear' is enabled.
 
 Example:
 	pps {
-- 
2.40.1
Re: [PATCH 4/5] dt-bindings: pps: pps-gpio: introduce pulse-width properties
Posted by Krzysztof Kozlowski 2 years, 7 months ago
On 25/06/2023 16:21, Eliav Farber wrote:
> Add two new optional properties to calculate PPS pulse-width in nano
> seconds:
>  - assert-pulse-width
>  - clear-pulse-width
> 
> Signed-off-by: Eliav Farber <farbere@amazon.com>
> ---
>  Documentation/devicetree/bindings/pps/pps-gpio.txt | 6 ++++++

No, no, one new property could sneak in, but three are a no go. DT schema.

>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.txt b/Documentation/devicetree/bindings/pps/pps-gpio.txt
> index 8d588e38c44e..9ecfd5fb3b63 100644
> --- a/Documentation/devicetree/bindings/pps/pps-gpio.txt
> +++ b/Documentation/devicetree/bindings/pps/pps-gpio.txt
> @@ -18,6 +18,12 @@ Optional properties:
>                   opposite of the assert edge (if assert is rising-edge then
>                   clear is falling-edge and if assert is falling-edge then
>                   clear is rising-edge).
> +- assert-pulse-width: when present, assert pulse width will be calculated in
> +                      nano seconds.
> +                      It should be enabled only if 'capture-clear' is enabled.
> +- clear-pulse-width: when present, clear pulse width will be calculated in
> +                     nano seconds.
> +                     It should be enabled only if 'capture-clear' is enabled.


I don't understand the description. Property name suggests there is some
units (so you need to use common property unit suffix), but description
suggests that you change the units to nanoseconds. That's very confusing.

Best regards,
Krzysztof