diff mbox series

[v5,1/7] dt-bindings: net: Add generic Bluetooth controller

Message ID 20221104211303.70222-2-sven@svenpeter.dev
State Accepted
Commit dea8565cb4a624affc72a8d89bdb97dac51cbe3c
Headers show
Series Broadcom/Apple Bluetooth driver for Apple Silicon | expand

Commit Message

Sven Peter Nov. 4, 2022, 9:12 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>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/net/bluetooth.txt     |  5 ----
 .../net/bluetooth/bluetooth-controller.yaml   | 29 +++++++++++++++++++
 .../{ => bluetooth}/qualcomm-bluetooth.yaml   |  6 ++--
 .../bindings/soc/qcom/qcom,wcnss.yaml         |  8 ++---
 4 files changed, 35 insertions(+), 13 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/net/bluetooth.txt
 create mode 100644 Documentation/devicetree/bindings/net/bluetooth/bluetooth-controller.yaml
 rename Documentation/devicetree/bindings/net/{ => bluetooth}/qualcomm-bluetooth.yaml (96%)

Comments

bluez.test.bot@gmail.com Nov. 4, 2022, 10:04 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=692274

---Test result---

Test Summary:
CheckPatch                    FAIL      7.46 seconds
GitLint                       FAIL      2.01 seconds
SubjectPrefix                 FAIL      2.61 seconds
BuildKernel                   PASS      34.62 seconds
BuildKernel32                 PASS      31.22 seconds
Incremental Build with patchesPASS      151.12 seconds
TestRunner: Setup             PASS      513.16 seconds
TestRunner: l2cap-tester      PASS      17.36 seconds
TestRunner: iso-tester        PASS      16.95 seconds
TestRunner: bnep-tester       PASS      6.66 seconds
TestRunner: mgmt-tester       PASS      107.82 seconds
TestRunner: rfcomm-tester     PASS      10.55 seconds
TestRunner: sco-tester        PASS      9.93 seconds
TestRunner: ioctl-tester      PASS      11.21 seconds
TestRunner: mesh-tester       PASS      8.08 seconds
TestRunner: smp-tester        PASS      9.90 seconds
TestRunner: userchan-tester   PASS      6.88 seconds

Details
##############################
Test: CheckPatch - FAIL - 7.46 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
[v5,1/7] dt-bindings: net: Add generic Bluetooth controller\WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#115: 
 .../{ => bluetooth}/qualcomm-bluetooth.yaml   |  6 ++--

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, 71 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/13032592.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.

[v5,3/7] arm64: dts: apple: t8103: Add Bluetooth controller\WARNING:UNDOCUMENTED_DT_STRING: DT compatible string vendor "pci14e4" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml
#210: FILE: arch/arm64/boot/dts/apple/t8103-jxxx.dtsi:83:
+		compatible = "pci14e4,5f69";

total: 0 errors, 1 warnings, 68 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/13032594.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.01 seconds
Run gitlint with rule in .gitlint
[v5,1/7] dt-bindings: net: Add generic Bluetooth controller
15: B1 Line exceeds max length (93>80): " create mode 100644 Documentation/devicetree/bindings/net/bluetooth/bluetooth-controller.yaml"
16: B1 Line exceeds max length (91>80): " rename Documentation/devicetree/bindings/net/{ => bluetooth}/qualcomm-bluetooth.yaml (96%)"

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


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



---
Regards,
Linux Bluetooth
Luiz Augusto von Dentz Nov. 4, 2022, 10:37 p.m. UTC | #2
Hi Sven,

On Fri, Nov 4, 2022 at 3:15 PM <bluez.test.bot@gmail.com> wrote:
>
> 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=692274
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    FAIL      7.46 seconds
> GitLint                       FAIL      2.01 seconds
> SubjectPrefix                 FAIL      2.61 seconds
> BuildKernel                   PASS      34.62 seconds
> BuildKernel32                 PASS      31.22 seconds
> Incremental Build with patchesPASS      151.12 seconds
> TestRunner: Setup             PASS      513.16 seconds
> TestRunner: l2cap-tester      PASS      17.36 seconds
> TestRunner: iso-tester        PASS      16.95 seconds
> TestRunner: bnep-tester       PASS      6.66 seconds
> TestRunner: mgmt-tester       PASS      107.82 seconds
> TestRunner: rfcomm-tester     PASS      10.55 seconds
> TestRunner: sco-tester        PASS      9.93 seconds
> TestRunner: ioctl-tester      PASS      11.21 seconds
> TestRunner: mesh-tester       PASS      8.08 seconds
> TestRunner: smp-tester        PASS      9.90 seconds
> TestRunner: userchan-tester   PASS      6.88 seconds
>
> Details
> ##############################
> Test: CheckPatch - FAIL - 7.46 seconds
> Run checkpatch.pl script with rule in .checkpatch.conf
> [v5,1/7] dt-bindings: net: Add generic Bluetooth controller\WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
> #115:
>  .../{ => bluetooth}/qualcomm-bluetooth.yaml   |  6 ++--
>
> 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, 71 lines checked

The other errors you can probably ignore but this one above got my
attention, it seems we are doing the right by having the documentation
changes as a separate patch but checkpatch is still complaining?

>
> 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/13032592.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.
>
> [v5,3/7] arm64: dts: apple: t8103: Add Bluetooth controller\WARNING:UNDOCUMENTED_DT_STRING: DT compatible string vendor "pci14e4" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml
> #210: FILE: arch/arm64/boot/dts/apple/t8103-jxxx.dtsi:83:
> +               compatible = "pci14e4,5f69";
>
> total: 0 errors, 1 warnings, 68 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/13032594.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.01 seconds
> Run gitlint with rule in .gitlint
> [v5,1/7] dt-bindings: net: Add generic Bluetooth controller
> 15: B1 Line exceeds max length (93>80): " create mode 100644 Documentation/devicetree/bindings/net/bluetooth/bluetooth-controller.yaml"
> 16: B1 Line exceeds max length (91>80): " rename Documentation/devicetree/bindings/net/{ => bluetooth}/qualcomm-bluetooth.yaml (96%)"
>
> [v5,2/7] dt-bindings: net: Add Broadcom BCM4377 family PCIe Bluetooth
> 14: B1 Line exceeds max length (95>80): " create mode 100644 Documentation/devicetree/bindings/net/bluetooth/brcm,bcm4377-bluetooth.yaml"
>
>
> ##############################
> Test: SubjectPrefix - FAIL - 2.61 seconds
> Check subject contains "Bluetooth" prefix
> "Bluetooth: " is not specified in the subject
> "Bluetooth: " is not specified in the subject
> "Bluetooth: " is not specified in the subject
>
>
>
> ---
> Regards,
> Linux Bluetooth
>
Sven Peter Nov. 5, 2022, 10:44 a.m. UTC | #3
Hi Luiz,

On Fri, Nov 4, 2022, at 23:37, Luiz Augusto von Dentz wrote:
> Hi Sven,
>
> On Fri, Nov 4, 2022 at 3:15 PM <bluez.test.bot@gmail.com> wrote:
>>
>> 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=692274
>>
>> ---Test result---
>>
>> Test Summary:
>> CheckPatch                    FAIL      7.46 seconds
>> GitLint                       FAIL      2.01 seconds
>> SubjectPrefix                 FAIL      2.61 seconds
>> BuildKernel                   PASS      34.62 seconds
>> BuildKernel32                 PASS      31.22 seconds
>> Incremental Build with patchesPASS      151.12 seconds
>> TestRunner: Setup             PASS      513.16 seconds
>> TestRunner: l2cap-tester      PASS      17.36 seconds
>> TestRunner: iso-tester        PASS      16.95 seconds
>> TestRunner: bnep-tester       PASS      6.66 seconds
>> TestRunner: mgmt-tester       PASS      107.82 seconds
>> TestRunner: rfcomm-tester     PASS      10.55 seconds
>> TestRunner: sco-tester        PASS      9.93 seconds
>> TestRunner: ioctl-tester      PASS      11.21 seconds
>> TestRunner: mesh-tester       PASS      8.08 seconds
>> TestRunner: smp-tester        PASS      9.90 seconds
>> TestRunner: userchan-tester   PASS      6.88 seconds
>>
>> Details
>> ##############################
>> Test: CheckPatch - FAIL - 7.46 seconds
>> Run checkpatch.pl script with rule in .checkpatch.conf
>> [v5,1/7] dt-bindings: net: Add generic Bluetooth controller\WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
>> #115:
>>  .../{ => bluetooth}/qualcomm-bluetooth.yaml   |  6 ++--
>>
>> 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, 71 lines checked
>
> The other errors you can probably ignore but this one above got my
> attention, it seems we are doing the right by having the documentation
> changes as a separate patch but checkpatch is still complaining?

I think that one happens because I replace bluetooth.txt with the yml binding
and replace all references to bluetooth.txt in the same commit. So technically
it looks like I introduce a generic binding and a more specific binding
that includes the generic one in a single commit.

I could split that into multiple commits but the DT maintainers seems to be
fine with the single commit. They also have their own CI and usually complain
if it generates warnings.


Best,


Sven
diff mbox series

Patch

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/bluetooth/bluetooth-controller.yaml b/Documentation/devicetree/bindings/net/bluetooth/bluetooth-controller.yaml
new file mode 100644
index 000000000000..9309dc40f54f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/bluetooth/bluetooth-controller.yaml
@@ -0,0 +1,29 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/bluetooth/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
+    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/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
similarity index 96%
rename from Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
rename to Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
index f93c6e7a1b59..a6a6b0e4df7a 100644
--- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/net/qualcomm-bluetooth.yaml#
+$id: http://devicetree.org/schemas/net/bluetooth/qualcomm-bluetooth.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Qualcomm Bluetooth Chips
@@ -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..0e6fd57d658d 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/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