[2/3] dt-bindings: gnss: u-blox: add "reset-gpios" binding

Message ID 20230712113731.3306-3-wsa+renesas@sang-engineering.com
State New
Headers
Series gnss: ubx: updates to support the Renesas KingFisher board |

Commit Message

Wolfram Sang July 12, 2023, 11:37 a.m. UTC
  Needed to enable this chip on a Renesas KingFisher board. Description
copied over from the Mediatek driver which already supports it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Krzysztof Kozlowski July 12, 2023, 11:48 a.m. UTC | #1
On 12/07/2023 13:37, Wolfram Sang wrote:
> Needed to enable this chip on a Renesas KingFisher board. Description
> copied over from the Mediatek driver which already supports it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
> index 4835a280b3bf..8f6992b97ca6 100644
> --- a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
> +++ b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
> @@ -41,6 +41,12 @@ properties:
>      description: >
>        Backup voltage regulator
>  
> +  reset-gpios:
> +    maxItems: 1
> +    description: >
> +      An optional reset line, with names such as RESET or NRESET.
> +      If the line is active low it should be flagged with GPIO_ACTIVE_LOW.
> +
>  required:
>    - compatible
>    - vcc-supply
> @@ -54,5 +60,6 @@ examples:
>              compatible = "u-blox,neo-8";
>              v-bckp-supply = <&gnss_v_bckp_reg>;
>              vcc-supply = <&gnss_vcc_reg>;
> +            reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;

This should complain with errors, because of missing header for the
defines, so usual disclaimer:

It does not look like you tested the bindings, at least after quick
look. Please run `make dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
Maybe you need to update your dtschema and yamllint.

Best regards,
Krzysztof
  
Geert Uytterhoeven July 12, 2023, 11:52 a.m. UTC | #2
Hi Wolfram,

On Wed, Jul 12, 2023 at 1:40 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Needed to enable this chip on a Renesas KingFisher board. Description
> copied over from the Mediatek driver which already supports it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
> +++ b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
> @@ -41,6 +41,12 @@ properties:
>      description: >
>        Backup voltage regulator
>
> +  reset-gpios:
> +    maxItems: 1
> +    description: >
> +      An optional reset line, with names such as RESET or NRESET.
> +      If the line is active low it should be flagged with GPIO_ACTIVE_LOW.

I think you can drop the description, as it describes only the obvious.

Gr{oetje,eeting}s,

                        Geert
  
Rob Herring July 12, 2023, 12:16 p.m. UTC | #3
On Wed, 12 Jul 2023 13:37:30 +0200, Wolfram Sang wrote:
> Needed to enable this chip on a Renesas KingFisher board. Description
> copied over from the Mediatek driver which already supports it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/gnss/u-blox,neo-6m.example.dts:23.40-41 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/gnss/u-blox,neo-6m.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1500: dt_binding_check] Error 2
make: *** [Makefile:234: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230712113731.3306-3-wsa+renesas@sang-engineering.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
  

Patch

diff --git a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
index 4835a280b3bf..8f6992b97ca6 100644
--- a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
+++ b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
@@ -41,6 +41,12 @@  properties:
     description: >
       Backup voltage regulator
 
+  reset-gpios:
+    maxItems: 1
+    description: >
+      An optional reset line, with names such as RESET or NRESET.
+      If the line is active low it should be flagged with GPIO_ACTIVE_LOW.
+
 required:
   - compatible
   - vcc-supply
@@ -54,5 +60,6 @@  examples:
             compatible = "u-blox,neo-8";
             v-bckp-supply = <&gnss_v_bckp_reg>;
             vcc-supply = <&gnss_vcc_reg>;
+            reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
         };
     };