diff mbox series

[v2,1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion

Message ID 3dca0518c14e3a8e563933c903de0d62429a3667.1615752835.git.lorenzo@kernel.org
State Superseded
Headers show
Series dt-bindings: convert mt76 and ieee80211 in yaml | expand

Commit Message

Lorenzo Bianconi March 14, 2021, 8:21 p.m. UTC
Convert generic ieee80211 dts bindings from .txt to .yaml

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 .../bindings/net/wireless/ieee80211.txt       | 24 -----------
 .../bindings/net/wireless/ieee80211.yaml      | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 24 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.txt
 create mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.yaml

Comments

Rob Herring (Arm) March 24, 2021, 5:16 p.m. UTC | #1
On Sun, Mar 14, 2021 at 09:21:06PM +0100, Lorenzo Bianconi wrote:
> Convert generic ieee80211 dts bindings from .txt to .yaml
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  .../bindings/net/wireless/ieee80211.txt       | 24 -----------
>  .../bindings/net/wireless/ieee80211.yaml      | 41 +++++++++++++++++++
>  2 files changed, 41 insertions(+), 24 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.txt
>  create mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.txt b/Documentation/devicetree/bindings/net/wireless/ieee80211.txt
> deleted file mode 100644
> index f6442b1397f5..000000000000
> --- a/Documentation/devicetree/bindings/net/wireless/ieee80211.txt
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -Common IEEE 802.11 properties
> -
> -This provides documentation of common properties that are valid for all wireless
> -devices.
> -
> -Optional properties:
> - - ieee80211-freq-limit : list of supported frequency ranges in KHz. This can be
> -	used for devices that in a given config support less channels than
> -	normally. It may happen chipset supports a wide wireless band but it is
> -	limited to some part of it due to used antennas or power amplifier.
> -	An example case for this can be tri-band wireless router with two
> -	identical chipsets used for two different 5 GHz subbands. Using them
> -	incorrectly could not work or decrease performance noticeably.
> -
> -Example:
> -
> -pcie@0,0 {
> -	reg = <0x0000 0 0 0 0>;
> -	wifi@0,0 {
> -		reg = <0x0000 0 0 0 0>;
> -		ieee80211-freq-limit = <2402000 2482000>,
> -				       <5170000 5250000>;
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
> new file mode 100644
> index 000000000000..6fb9ae7403c1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
> @@ -0,0 +1,41 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
> +
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/wireless/ieee80211.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Common IEEE 802.11 Binding
> +
> +maintainers:
> +  - Johannes Berg <johannes@sipsolutions.net>
> +
> +description: |
> +  This provides documentation of common properties that are valid for
> +  all wireless devices
> +
> +properties:
> +  ieee80211-freq-limit:

Needs a type ref:

$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
  minItems: 2
  maxItems: 2

> +    description:
> +      List of supported frequency ranges in KHz. This can be used for devices
> +      that in a given config support less channels than normally. It may happen
> +      chipset supports a wide wireless band but it is limited to some part of
> +      it due to used antennas or power amplifier. An example case for this
> +      can be tri-band wireless router with two identical chipsets used for two
> +      different 5 GHz subbands. Using them incorrectly could not work or
> +      decrease performance noticeably
> +
> +additionalProperties: true
> +
> +examples:
> +  - |
> +    pcie0 {
> +      #address-cells = <3>;
> +      #size-cells = <2>;
> +      wifi@0,0 {
> +        reg = <0x0000 0 0 0 0>;
> +        ieee80211-freq-limit = <2402000 2482000>,
> +                               <5170000 5250000>;
> +      };
> +    };
> -- 
> 2.29.2
>
Johannes Berg March 24, 2021, 9:03 p.m. UTC | #2
On Sun, 2021-03-14 at 21:21 +0100, Lorenzo Bianconi wrote:
> 

> +++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml

> @@ -0,0 +1,41 @@

> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

> +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.

> +

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/net/wireless/ieee80211.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: Common IEEE 802.11 Binding

> +

> +maintainers:

> +  - Johannes Berg <johannes@sipsolutions.net>


Heh, now I realize why I got CC'ed on these patches.

I'm not sure that's really all that appropriate? I may be the wireless
stack maintainer, but I really don't know much about DT, and so I'm not
convinced that this entry helps anyone...

johannes
Lorenzo Bianconi March 24, 2021, 9:17 p.m. UTC | #3
> On Sun, 2021-03-14 at 21:21 +0100, Lorenzo Bianconi wrote:
> > 
> > +++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
> > @@ -0,0 +1,41 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
> > +
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/wireless/ieee80211.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Common IEEE 802.11 Binding
> > +
> > +maintainers:
> > +  - Johannes Berg <johannes@sipsolutions.net>
> 
> Heh, now I realize why I got CC'ed on these patches.
> 
> I'm not sure that's really all that appropriate? I may be the wireless
> stack maintainer, but I really don't know much about DT, and so I'm not
> convinced that this entry helps anyone...

ack, I will add myself as maintainer (but I am not an expert as well :))

Regards,
Lorenzo

> 
> johannes
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.txt b/Documentation/devicetree/bindings/net/wireless/ieee80211.txt
deleted file mode 100644
index f6442b1397f5..000000000000
--- a/Documentation/devicetree/bindings/net/wireless/ieee80211.txt
+++ /dev/null
@@ -1,24 +0,0 @@ 
-Common IEEE 802.11 properties
-
-This provides documentation of common properties that are valid for all wireless
-devices.
-
-Optional properties:
- - ieee80211-freq-limit : list of supported frequency ranges in KHz. This can be
-	used for devices that in a given config support less channels than
-	normally. It may happen chipset supports a wide wireless band but it is
-	limited to some part of it due to used antennas or power amplifier.
-	An example case for this can be tri-band wireless router with two
-	identical chipsets used for two different 5 GHz subbands. Using them
-	incorrectly could not work or decrease performance noticeably.
-
-Example:
-
-pcie@0,0 {
-	reg = <0x0000 0 0 0 0>;
-	wifi@0,0 {
-		reg = <0x0000 0 0 0 0>;
-		ieee80211-freq-limit = <2402000 2482000>,
-				       <5170000 5250000>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
new file mode 100644
index 000000000000..6fb9ae7403c1
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
@@ -0,0 +1,41 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/wireless/ieee80211.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common IEEE 802.11 Binding
+
+maintainers:
+  - Johannes Berg <johannes@sipsolutions.net>
+
+description: |
+  This provides documentation of common properties that are valid for
+  all wireless devices
+
+properties:
+  ieee80211-freq-limit:
+    description:
+      List of supported frequency ranges in KHz. This can be used for devices
+      that in a given config support less channels than normally. It may happen
+      chipset supports a wide wireless band but it is limited to some part of
+      it due to used antennas or power amplifier. An example case for this
+      can be tri-band wireless router with two identical chipsets used for two
+      different 5 GHz subbands. Using them incorrectly could not work or
+      decrease performance noticeably
+
+additionalProperties: true
+
+examples:
+  - |
+    pcie0 {
+      #address-cells = <3>;
+      #size-cells = <2>;
+      wifi@0,0 {
+        reg = <0x0000 0 0 0 0>;
+        ieee80211-freq-limit = <2402000 2482000>,
+                               <5170000 5250000>;
+      };
+    };