diff mbox series

[v2,1/5] dt-bindings: net: Add generic Bluetooth controller

Message ID 20220907170935.11757-2-sven@svenpeter.dev (mailing list archive)
State Superseded
Headers show
Series Broadcom/Apple Bluetooth driver for Apple Silicon | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch fail [v2,1/5] dt-bindings: net: Add generic Bluetooth controller\Traceback (most recent call last): File "scripts/spdxcheck.py", line 6, in <module> from ply import lex, yacc ModuleNotFoundError: No module named 'ply' WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #136: new file mode 100644 WARNING:DT_SPLIT_BINDING_PATCH: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst WARNING:DT_SPLIT_BINDING_PATCH: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst total: 0 errors, 3 warnings, 64 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/12969309.patch has style problems, please review. NOTE: Ignored message types: UNKNOWN_COMMIT_ID NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
tedd_an/gitlint fail [v2,1/5] dt-bindings: net: Add generic Bluetooth controller 23: B1 Line exceeds max length (83>80): " create mode 100644 Documentation/devicetree/bindings/net/bluetooth-controller.yaml"
tedd_an/subjectprefix fail "Bluetooth: " is not specified in the subject
tedd_an/buildkernel success Build Kernel PASS
tedd_an/buildkernel32 success Build Kernel32 PASS
tedd_an/incremental_build success Pass
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneriso-tester success Total: 55, Passed: 55 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 494, Passed: 494 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 10, Passed: 10 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

Sven Peter Sept. 7, 2022, 5:09 p.m. UTC
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

Comments

bluez.test.bot@gmail.com Sept. 7, 2022, 6:19 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=674956

---Test result---

Test Summary:
CheckPatch                    FAIL      2.08 seconds
GitLint                       FAIL      2.87 seconds
SubjectPrefix                 FAIL      1.69 seconds
BuildKernel                   PASS      34.57 seconds
BuildKernel32                 PASS      30.39 seconds
Incremental Build with patchesPASS      112.15 seconds
TestRunner: Setup             PASS      502.59 seconds
TestRunner: l2cap-tester      PASS      17.04 seconds
TestRunner: iso-tester        PASS      15.74 seconds
TestRunner: bnep-tester       PASS      6.33 seconds
TestRunner: mgmt-tester       PASS      100.03 seconds
TestRunner: rfcomm-tester     PASS      9.84 seconds
TestRunner: sco-tester        PASS      9.41 seconds
TestRunner: smp-tester        PASS      9.38 seconds
TestRunner: userchan-tester   PASS      6.45 seconds

Details
##############################
Test: CheckPatch - FAIL - 2.08 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
[v2,1/5] dt-bindings: net: Add generic Bluetooth controller\Traceback (most recent call last):
  File "scripts/spdxcheck.py", line 6, in <module>
    from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#136: 
new file mode 100644

WARNING:DT_SPLIT_BINDING_PATCH: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst

WARNING:DT_SPLIT_BINDING_PATCH: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst

total: 0 errors, 3 warnings, 64 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12969309.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL - 2.87 seconds
Run gitlint with rule in .gitlint
[v2,1/5] dt-bindings: net: Add generic Bluetooth controller
23: B1 Line exceeds max length (83>80): " create mode 100644 Documentation/devicetree/bindings/net/bluetooth-controller.yaml"

[v2,2/5] dt-bindings: net: Add Broadcom BCM4377 family PCIe Bluetooth
18: B1 Line exceeds max length (85>80): " create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml"

[v2,3/5] Bluetooth: hci_event: Add quirk to ignore byte in LE Extended Adv Report
1: T1 Title exceeds max length (81>80): "[v2,3/5] Bluetooth: hci_event: Add quirk to ignore byte in LE Extended Adv Report"


##############################
Test: SubjectPrefix - FAIL - 1.69 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject
"Bluetooth: " is not specified in the subject



---
Regards,
Linux Bluetooth
Krzysztof Kozlowski Sept. 8, 2022, 11:16 a.m. UTC | #2
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
Sven Peter Sept. 19, 2022, 3:15 p.m. UTC | #3
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
diff mbox series

Patch

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