linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hakan Jansson <hakan.jansson@infineon.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Hakan Jansson <hakan.jansson@infineon.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	<netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	"Luiz Augusto von Dentz" <luiz.dentz@gmail.com>,
	<linux-bluetooth@vger.kernel.org>
Subject: [PATCH v2 2/5] dt-bindings: net: broadcom-bluetooth: Add conditional constraints
Date: Thu, 30 Jun 2022 14:45:21 +0200	[thread overview]
Message-ID: <3591c206eeccdacb8b4e702494d799792b752661.1656583541.git.hakan.jansson@infineon.com> (raw)
In-Reply-To: <cover.1656583541.git.hakan.jansson@infineon.com>

Add conditional constraint to make property "reset-gpios" available only
for compatible devices acually having the reset pin.

Make property "brcm,requires-autobaud-mode" depend on property
"shutdown-gpios" as the shutdown pin is required to enter autobaud mode.

I looked at all compatible devices and compiled the matrix below before
formulating the conditional constraint. This was a pure paper exercise and
no verification testing has been performed.

                                d
                                e
                                v h
                                i o
                                c s
                            s   e t
                            h   - -
                            u   w w       v
                            t r a a     v d
                            d e k k     b d
                            o s e e     a i
                            w e u u     t o
                            n t p p     - -
                            - - - -     s s
                            g g g g     u u
                            p p p p t   p p
                            i i i i x l p p
                            o o o o c p l l
                            s s s s o o y y
    ---------------------------------------
    brcm,bcm20702a1         X X X X X X X X
    brcm,bcm4329-bt         X X X X X X X X
    brcm,bcm4330-bt         X X X X X X X X
    brcm,bcm4334-bt         X - X X X X X X
    brcm,bcm43438-bt        X - X X X X X X
    brcm,bcm4345c5          X - X X X X X X
    brcm,bcm43540-bt        X - X X X X X X
    brcm,bcm4335a0          X - X X X X X X
    brcm,bcm4349-bt         X - X X X X X X
    infineon,cyw55572-bt    X - X X X X X X

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
---
V1 -> V2:
  - New patch added to series

 .../bindings/net/broadcom-bluetooth.yaml         | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
index 71fe9b17f8f1..445b2a553625 100644
--- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
@@ -117,6 +117,22 @@ properties:
 required:
   - compatible
 
+dependencies:
+  brcm,requires-autobaud-mode: [ 'shutdown-gpios' ]
+
+if:
+  not:
+    properties:
+      compatible:
+        contains:
+          enum:
+            - brcm,bcm20702a1
+            - brcm,bcm4329-bt
+            - brcm,bcm4330-bt
+then:
+  properties:
+    reset-gpios: false
+
 additionalProperties: false
 
 examples:
-- 
2.25.1


  parent reply	other threads:[~2022-06-30 12:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 12:45 [PATCH v2 0/5] Bluetooth: hci_bcm: Improve FW load time on CYW55572 Hakan Jansson
2022-06-30 12:45 ` [PATCH v2 1/5] dt-bindings: net: broadcom-bluetooth: Add CYW55572 DT binding Hakan Jansson
2022-07-11  8:31   ` Linus Walleij
2022-06-30 12:45 ` Hakan Jansson [this message]
2022-07-01 20:13   ` [PATCH v2 2/5] dt-bindings: net: broadcom-bluetooth: Add conditional constraints Rob Herring
2022-07-11  8:32   ` Linus Walleij
2022-06-30 12:45 ` [PATCH v2 3/5] Bluetooth: hci_bcm: Add DT compatible for CYW55572 Hakan Jansson
2022-07-11  8:33   ` Linus Walleij
2022-06-30 12:45 ` [PATCH v2 4/5] Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode Hakan Jansson
2022-06-30 12:53 ` [PATCH v2 5/5] Bluetooth: hci_bcm: Increase host baudrate for CYW55572 " Hakan Jansson
2022-07-11  8:34   ` Linus Walleij
2022-07-20 16:20 ` [PATCH v2 0/5] Bluetooth: hci_bcm: Improve FW load time on CYW55572 patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3591c206eeccdacb8b4e702494d799792b752661.1656583541.git.hakan.jansson@infineon.com \
    --to=hakan.jansson@infineon.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=johan.hedberg@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).