public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/5] dt-bindings: net: Add generic Bluetooth controller
       [not found] <20220907170935.11757-1-sven@svenpeter.dev>
@ 2022-09-07 17:09 ` Sven Peter
  2022-09-08 11:16   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Peter @ 2022-09-07 17:09 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	Rob Herring, Krzysztof Kozlowski
  Cc: Sven Peter, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Hector Martin, Alyssa Rosenzweig, asahi, netdev,
	devicetree, linux-arm-kernel, linux-bluetooth, linux-kernel,
	Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Balakrishna Godavarthi, Rocky Liao, linux-arm-msm


Bluetooth controllers share the common local-bd-address property.
Add a generic YAML schema to replace bluetooth.txt for those.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
changes from v1:
  - removed blueetooth.txt instead of just replacing it with a
    deprecation note
  - replaced references to bluetooth.txt

checkpatch complains here because it thinks I do to many things at once,
I think it's better to replace bluetooth.txt in single commit though.
Let me know if you prefer this to be split into multiple commits
instead.

.../bindings/net/bluetooth-controller.yaml    | 30 +++++++++++++++++++
 .../devicetree/bindings/net/bluetooth.txt     |  5 ----
 .../bindings/net/qualcomm-bluetooth.yaml      |  4 +--
 .../bindings/soc/qcom/qcom,wcnss.yaml         |  8 ++---
 4 files changed, 35 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/bluetooth-controller.yaml
 delete mode 100644 Documentation/devicetree/bindings/net/bluetooth.txt

diff --git a/Documentation/devicetree/bindings/net/bluetooth-controller.yaml b/Documentation/devicetree/bindings/net/bluetooth-controller.yaml
new file mode 100644
index 000000000000..0ea8a20e30f9
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/bluetooth-controller.yaml
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/bluetooth-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bluetooth Controller Generic Binding
+
+maintainers:
+  - Marcel Holtmann <marcel@holtmann.org>
+  - Johan Hedberg <johan.hedberg@gmail.com>
+  - Luiz Augusto von Dentz <luiz.dentz@gmail.com>
+
+properties:
+  $nodename:
+    pattern: "^bluetooth(@.*)?$"
+
+  local-bd-address:
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+    minItems: 6
+    maxItems: 6
+    description:
+      Specifies the BD address that was uniquely assigned to the Bluetooth
+      device. Formatted with least significant byte first (little-endian), e.g.
+      in order to assign the address 00:11:22:33:44:55 this property must have
+      the value [55 44 33 22 11 00].
+
+additionalProperties: true
+
+...
diff --git a/Documentation/devicetree/bindings/net/bluetooth.txt b/Documentation/devicetree/bindings/net/bluetooth.txt
deleted file mode 100644
index 94797df751b8..000000000000
--- a/Documentation/devicetree/bindings/net/bluetooth.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-The following properties are common to the Bluetooth controllers:
-
-- local-bd-address: array of 6 bytes, specifies the BD address that was
-  uniquely assigned to the Bluetooth device, formatted with least significant
-  byte first (little-endian).
diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
index f93c6e7a1b59..77eefa883d0a 100644
--- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
@@ -79,8 +79,7 @@ properties:
   firmware-name:
     description: specify the name of nvm firmware to load
 
-  local-bd-address:
-    description: see Documentation/devicetree/bindings/net/bluetooth.txt
+  local-bd-address: true
 
 
 required:
@@ -89,6 +88,7 @@ required:
 additionalProperties: false
 
 allOf:
+  - $ref: bluetooth-controller.yaml#
   - if:
       properties:
         compatible:
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml
index 5320504bb5e0..a1417cf30a32 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml
@@ -42,15 +42,13 @@ properties:
   bluetooth:
     type: object
     additionalProperties: false
+    allOf:
+      - $ref: /schemas/net/bluetooth-controller.yaml#
     properties:
       compatible:
         const: qcom,wcnss-bt
 
-      local-bd-address:
-        $ref: /schemas/types.yaml#/definitions/uint8-array
-        maxItems: 6
-        description:
-          See Documentation/devicetree/bindings/net/bluetooth.txt
+      local-bd-address: true
 
     required:
       - compatible
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/5] dt-bindings: net: Add generic Bluetooth controller
  2022-09-07 17:09 ` [PATCH v2 1/5] dt-bindings: net: Add generic Bluetooth controller Sven Peter
@ 2022-09-08 11:16   ` Krzysztof Kozlowski
  2022-09-19 15:15     ` Sven Peter
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-08 11:16 UTC (permalink / raw)
  To: Sven Peter, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, Rob Herring, Krzysztof Kozlowski
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Hector Martin, Alyssa Rosenzweig, asahi, netdev, devicetree,
	linux-arm-kernel, linux-bluetooth, linux-kernel, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Balakrishna Godavarthi,
	Rocky Liao, linux-arm-msm

On 07/09/2022 19:09, Sven Peter wrote:
> 
> Bluetooth controllers share the common local-bd-address property.
> Add a generic YAML schema to replace bluetooth.txt for those.
> 
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
> changes from v1:
>   - removed blueetooth.txt instead of just replacing it with a
>     deprecation note
>   - replaced references to bluetooth.txt
> 
> checkpatch complains here because it thinks I do to many things at once,
> I think it's better to replace bluetooth.txt in single commit though.
> Let me know if you prefer this to be split into multiple commits
> instead.
> 
> .../bindings/net/bluetooth-controller.yaml    | 30 +++++++++++++++++++

I propose to keep it in net/bluetooth subdirectory. In next patch you
can move there other files.

>  .../devicetree/bindings/net/bluetooth.txt     |  5 ----
>  .../bindings/net/qualcomm-bluetooth.yaml      |  4 +--
>  .../bindings/soc/qcom/qcom,wcnss.yaml         |  8 ++---
>  4 files changed, 35 insertions(+), 12 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/bluetooth-controller.yaml
>  delete mode 100644 Documentation/devicetree/bindings/net/bluetooth.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/bluetooth-controller.yaml b/Documentation/devicetree/bindings/net/bluetooth-controller.yaml
> new file mode 100644
> index 000000000000..0ea8a20e30f9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/bluetooth-controller.yaml
> @@ -0,0 +1,30 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/bluetooth-controller.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Bluetooth Controller Generic Binding
> +
> +maintainers:
> +  - Marcel Holtmann <marcel@holtmann.org>
> +  - Johan Hedberg <johan.hedberg@gmail.com>
> +  - Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^bluetooth(@.*)?$"
> +
> +  local-bd-address:
> +    $ref: /schemas/types.yaml#/definitions/uint8-array
> +    minItems: 6

No need for minitems.



Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/5] dt-bindings: net: Add generic Bluetooth controller
  2022-09-08 11:16   ` Krzysztof Kozlowski
@ 2022-09-19 15:15     ` Sven Peter
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Peter @ 2022-09-19 15:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, Rob Herring, Krzysztof Kozlowski
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Hector Martin, Alyssa Rosenzweig, asahi, netdev, devicetree,
	linux-arm-kernel, linux-bluetooth, linux-kernel, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Balakrishna Godavarthi,
	Rocky Liao, linux-arm-msm

Hi,

On Thu, Sep 8, 2022, at 13:16, Krzysztof Kozlowski wrote:
> On 07/09/2022 19:09, Sven Peter wrote:
>> 
>> Bluetooth controllers share the common local-bd-address property.
>> Add a generic YAML schema to replace bluetooth.txt for those.
>> 
>> Signed-off-by: Sven Peter <sven@svenpeter.dev>
>> ---
>> changes from v1:
>>   - removed blueetooth.txt instead of just replacing it with a
>>     deprecation note
>>   - replaced references to bluetooth.txt
>> 
>> checkpatch complains here because it thinks I do to many things at once,
>> I think it's better to replace bluetooth.txt in single commit though.
>> Let me know if you prefer this to be split into multiple commits
>> instead.
>> 
>> .../bindings/net/bluetooth-controller.yaml    | 30 +++++++++++++++++++
>
> I propose to keep it in net/bluetooth subdirectory. In next patch you
> can move there other files.

Sure, I can also already move net/qualcomm-bluetooth.yaml to the new
subdirectory since I need to touch it in this commit anyway.

>
>>  .../devicetree/bindings/net/bluetooth.txt     |  5 ----
>>  .../bindings/net/qualcomm-bluetooth.yaml      |  4 +--
>>  .../bindings/soc/qcom/qcom,wcnss.yaml         |  8 ++---
>>  4 files changed, 35 insertions(+), 12 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/net/bluetooth-controller.yaml
>>  delete mode 100644 Documentation/devicetree/bindings/net/bluetooth.txt
>> 
>> diff --git a/Documentation/devicetree/bindings/net/bluetooth-controller.yaml b/Documentation/devicetree/bindings/net/bluetooth-controller.yaml
>> new file mode 100644
>> index 000000000000..0ea8a20e30f9
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/bluetooth-controller.yaml
>> @@ -0,0 +1,30 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/net/bluetooth-controller.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Bluetooth Controller Generic Binding
>> +
>> +maintainers:
>> +  - Marcel Holtmann <marcel@holtmann.org>
>> +  - Johan Hedberg <johan.hedberg@gmail.com>
>> +  - Luiz Augusto von Dentz <luiz.dentz@gmail.com>
>> +
>> +properties:
>> +  $nodename:
>> +    pattern: "^bluetooth(@.*)?$"
>> +
>> +  local-bd-address:
>> +    $ref: /schemas/types.yaml#/definitions/uint8-array
>> +    minItems: 6
>
> No need for minitems.

Ok, dropped.


Best,


Sven

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-19 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220907170935.11757-1-sven@svenpeter.dev>
2022-09-07 17:09 ` [PATCH v2 1/5] dt-bindings: net: Add generic Bluetooth controller Sven Peter
2022-09-08 11:16   ` Krzysztof Kozlowski
2022-09-19 15:15     ` Sven Peter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox