2022-11-08 06:19:10

by Dominique Martinet

[permalink] [raw]
Subject: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4

Add devicetree binding to support defining a bluetooth device using the h4
uart protocol

This was tested with a NXP wireless+BT AW-XM458 module, but might
benefit others as the H4 protocol seems often used.

Signed-off-by: Dominique Martinet <[email protected]>
---
.../devicetree/bindings/net/h4-bluetooth.yaml | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/h4-bluetooth.yaml

diff --git a/Documentation/devicetree/bindings/net/h4-bluetooth.yaml b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml
new file mode 100644
index 000000000000..5d11b89ca386
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/h4-bluetooth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: H4 Bluetooth
+
+maintainers:
+ - Dominique Martinet <[email protected]>
+
+description:
+ H4 is a common bluetooth over uart protocol.
+ For example, the AW-XM458 is a WiFi + BT module where the WiFi part is
+ connected over PCI (M.2), while BT is connected over serial speaking
+ the H4 protocol. Its firmware is sent on the PCI side.
+
+properties:
+ compatible:
+ enum:
+ - nxp,aw-xm458-bt
+
+ max-speed: true
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/clock/imx8mp-clock.h>
+
+ uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ assigned-clocks = <&clk IMX8MP_CLK_UART1>;
+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
+ status = "okay";
+ fsl,dte-mode = <1>;
+ fsl,uart-has-rtscts;
+
+
+ bluetooth {
+ compatible = "nxp,aw-xm458-bt";
+ max-speed = <3000000>;
+ };
+ };
--
2.35.1




2022-11-08 07:18:18

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add serdev support for hci h4

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=693092

---Test result---

Test Summary:
CheckPatch FAIL 1.79 seconds
GitLint PASS 2.09 seconds
SubjectPrefix FAIL 1.79 seconds
BuildKernel PASS 34.54 seconds
BuildKernel32 PASS 30.74 seconds
Incremental Build with patchesPASS 55.10 seconds
TestRunner: Setup PASS 516.75 seconds
TestRunner: l2cap-tester PASS 17.74 seconds
TestRunner: iso-tester PASS 17.16 seconds
TestRunner: bnep-tester PASS 6.69 seconds
TestRunner: mgmt-tester PASS 107.68 seconds
TestRunner: rfcomm-tester PASS 10.57 seconds
TestRunner: sco-tester PASS 10.02 seconds
TestRunner: ioctl-tester PASS 11.47 seconds
TestRunner: mesh-tester PASS 8.17 seconds
TestRunner: smp-tester PASS 9.94 seconds
TestRunner: userchan-tester PASS 6.99 seconds

Details
##############################
Test: CheckPatch - FAIL - 1.79 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
[RFC,1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4\WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#114:
new file mode 100644

total: 0 errors, 1 warnings, 49 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/13035921.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: SubjectPrefix - FAIL - 1.79 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject
"Bluetooth: " is not specified in the subject



---
Regards,
Linux Bluetooth

2022-11-08 11:51:53

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4

On 08/11/2022 06:55, Dominique Martinet wrote:
> Add devicetree binding to support defining a bluetooth device using the h4
> uart protocol
>

subject: drop second redundant "bindings"

> This was tested with a NXP wireless+BT AW-XM458 module, but might
> benefit others as the H4 protocol seems often used.
>
> Signed-off-by: Dominique Martinet <[email protected]>
> ---
> .../devicetree/bindings/net/h4-bluetooth.yaml | 49 +++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/h4-bluetooth.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/h4-bluetooth.yaml b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml
> new file mode 100644
> index 000000000000..5d11b89ca386
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml

If the schema is for one specific device, then filename matching the
compatible, so nxp,aw-xm458-bt.yaml... but I understand you want to
describe here class of devices using H4 Bluetooth? Won't they need their
own specific properties?


> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/h4-bluetooth.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: H4 Bluetooth
> +
> +maintainers:
> + - Dominique Martinet <[email protected]>
> +
> +description:
> + H4 is a common bluetooth over uart protocol.

Bluetooth
UART

> + For example, the AW-XM458 is a WiFi + BT module where the WiFi part is
> + connected over PCI (M.2), while BT is connected over serial speaking
> + the H4 protocol. Its firmware is sent on the PCI side.
> +
> +properties:
> + compatible:
> + enum:
> + - nxp,aw-xm458-bt
> +
> + max-speed: true
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/clock/imx8mp-clock.h>
> +
> + uart1 {

uart

> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_uart1>;
> + assigned-clocks = <&clk IMX8MP_CLK_UART1>;
> + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;

Drop unrelated properties.

> + status = "okay";

Drop status.

> + fsl,dte-mode = <1>;
> + fsl,uart-has-rtscts;

Are these two related to this hardware?

> +
> +
> + bluetooth {
> + compatible = "nxp,aw-xm458-bt";
> + max-speed = <3000000>;
> + };
> + };

Best regards,
Krzysztof


2022-11-08 13:05:07

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4


On Tue, 08 Nov 2022 14:55:30 +0900, Dominique Martinet wrote:
> Add devicetree binding to support defining a bluetooth device using the h4
> uart protocol
>
> This was tested with a NXP wireless+BT AW-XM458 module, but might
> benefit others as the H4 protocol seems often used.
>
> Signed-off-by: Dominique Martinet <[email protected]>
> ---
> .../devicetree/bindings/net/h4-bluetooth.yaml | 49 +++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/h4-bluetooth.yaml
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
fsl,dte-mode: boolean property with value b'\x00\x00\x00\x01'
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/h4-bluetooth.example.dtb: uart1: fsl,dte-mode: b'\x00\x00\x00\x01' is not of type 'object', 'array', 'boolean', 'null'
From schema: /usr/local/lib/python3.10/dist-packages/dtschema/schemas/dt-core.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/h4-bluetooth.example.dtb: uart1: 'anyOf' conditional failed, one must be fixed:
'clocks' is a required property
'#clock-cells' is a required property
From schema: /usr/local/lib/python3.10/dist-packages/dtschema/schemas/clock/clock.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


2022-11-08 14:00:57

by Rob Herring

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4

On Mon, Nov 7, 2022 at 11:56 PM Dominique Martinet
<[email protected]> wrote:
>
> Add devicetree binding to support defining a bluetooth device using the h4
> uart protocol

The protocol is mostly irrelevant to the binding. The binding is for a
particular device even if the driver is shared.

>
> This was tested with a NXP wireless+BT AW-XM458 module, but might
> benefit others as the H4 protocol seems often used.
>
> Signed-off-by: Dominique Martinet <[email protected]>
> ---
> .../devicetree/bindings/net/h4-bluetooth.yaml | 49 +++++++++++++++++++

Use the compatible string for the filename.

There's now a pending (in linux-next) net/bluetooth/ directory and a
bluetooth-controller.yaml schema which you should reference.

> 1 file changed, 49 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/h4-bluetooth.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/h4-bluetooth.yaml b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml
> new file mode 100644
> index 000000000000..5d11b89ca386
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/h4-bluetooth.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: H4 Bluetooth
> +
> +maintainers:
> + - Dominique Martinet <[email protected]>
> +
> +description:
> + H4 is a common bluetooth over uart protocol.
> + For example, the AW-XM458 is a WiFi + BT module where the WiFi part is
> + connected over PCI (M.2), while BT is connected over serial speaking
> + the H4 protocol. Its firmware is sent on the PCI side.
> +
> +properties:
> + compatible:
> + enum:
> + - nxp,aw-xm458-bt
> +
> + max-speed: true
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/clock/imx8mp-clock.h>
> +
> + uart1 {

serial {

> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_uart1>;
> + assigned-clocks = <&clk IMX8MP_CLK_UART1>;
> + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
> + status = "okay";
> + fsl,dte-mode = <1>;
> + fsl,uart-has-rtscts;

All these properties are irrelevant to the example. Drop.

> +
> +
> + bluetooth {
> + compatible = "nxp,aw-xm458-bt";
> + max-speed = <3000000>;
> + };
> + };
> --
> 2.35.1
>
>

2022-11-08 23:58:54

by Dominique Martinet

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4

Thanks for all the replies!

All remarks make sense, I'll do my homework and send a v2 once extra
questions have been answered.

Rob Herring wrote on Tue, Nov 08, 2022 at 07:59:33AM -0600:
> On Mon, Nov 7, 2022 at 11:56 PM Dominique Martinet
> <[email protected]> wrote:
> > Add devicetree binding to support defining a bluetooth device using the h4
> > uart protocol
>
> The protocol is mostly irrelevant to the binding. The binding is for a
> particular device even if the driver is shared.

This echoes the point below: I wanted to make this a bit more generic
for other adapters, question at the end of my first reply to Krzysztof
below.

> There's now a pending (in linux-next) net/bluetooth/ directory and a
> bluetooth-controller.yaml schema which you should reference.

Will check it out and add that.

Krzysztof Kozlowski wrote on Tue, Nov 08, 2022 at 12:37:39PM +0100:
> > diff --git a/Documentation/devicetree/bindings/net/h4-bluetooth.yaml b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml
> > new file mode 100644
> > index 000000000000..5d11b89ca386
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml
>
> If the schema is for one specific device, then filename matching the
> compatible, so nxp,aw-xm458-bt.yaml... but I understand you want to
> describe here class of devices using H4 Bluetooth? Won't they need their
> own specific properties?

H4 bluetooth itself has very little configurable elements, from what I
can see about the device I'm using the actual configuration is done by
the wifi driver that uploads a "combo" firmware over the PCI side
(it's based on mwifiex, so for example mrvl/pcieuart8997_combo_v4.bin
upstream works the same way afaik)

This is a pretty terrible design, as the Bluetooth side cannot actually
know when the device is ready as the initialization takes place, but
that means there really aren't any property to give here

(I haven't reproduced during normal boot, but in particular if I run
bluetoothd before loading the wifi driver, I need to unbind/bind the
serial device from the hci_uart_h4 driver to recover bluetooth...
With that in mind it might actually be best to try to coordinate this
from userspace with btattach after all, and I'd be happy with that if I
didn't have to fight our init system so much, but as things stand having
it autoloaded by the kernel is more convenient for us... Which is
admitedly a weak reason for you all, feel free to tell me this isn't
viable)


Anyway, there probably would be other devices benefiting from this, at
the very least other cards in the mwifiex family, but I'm doing this as
a end user so I'm not comfortable adding devices I cannot test.

So with all of this (sorry for the wall of text), should I try to keep
this generic, or just give up and make it specific to nxp,aw-xm458-bt
and let whoever adds the next device rename the file?


> > +examples:
> > + - |
> > + #include <dt-bindings/gpio/gpio.h>
> > + #include <dt-bindings/clock/imx8mp-clock.h>
> > +
> > + uart {
> > + fsl,dte-mode = <1>;
> > + fsl,uart-has-rtscts;
>
> Are these two related to this hardware?

I'd say it's related to my soc rather than the Bluetooth adapter; I
tried to give a full example but it's unrelated and I'll drop this as
well.

--
Dominique Martinet



2022-11-09 07:34:39

by Dominique Martinet

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4

Dominique Martinet wrote on Wed, Nov 09, 2022 at 08:54:42AM +0900:
> This is a pretty terrible design, as the Bluetooth side cannot actually
> know when the device is ready as the initialization takes place, but
> that means there really aren't any property to give here
>
> (I haven't reproduced during normal boot, but in particular if I run
> bluetoothd before loading the wifi driver, I need to unbind/bind the
> serial device from the hci_uart_h4 driver to recover bluetooth...
> With that in mind it might actually be best to try to coordinate this
> from userspace with btattach after all, and I'd be happy with that if I
> didn't have to fight our init system so much, but as things stand having
> it autoloaded by the kernel is more convenient for us... Which is
> admitedly a weak reason for you all, feel free to tell me this isn't
> viable)

This actually hasn't taken long to bite us: while the driver does work,
we get error messages early on before the firmware is loaded.
(In hindsight, I probably should have waited a few days before sending
this...)


My current workaround is to return EPROBE_DEFER until we can find a
netdev with a known name in the init namespace, but that isn't really
something I'd consider upstreamable for obvious reasons (interfaces can
be renamed or moved to different namespaces so this is inherently racy
and it's just out of place in BT code)

That makes these two patches on their own rather useless as well, so
unless one of you have an idea that's less ugly I'd guess just dropping
this is the way to go, as much as I dislike the idea of adding more
non-upstream code than we already have :(

Thank you both for your time, the replies have been very helpful and
I'll remember for next time I try to submit something!

And if you have a suggestion, I'll be happy to do some legwork to clean
this mess, so feel free to ask :)


Thanks,
--
Dominique



2022-11-09 22:19:17

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4

On Wed, Nov 09, 2022 at 04:29:52PM +0900, Dominique Martinet wrote:
> Dominique Martinet wrote on Wed, Nov 09, 2022 at 08:54:42AM +0900:
> > This is a pretty terrible design, as the Bluetooth side cannot actually
> > know when the device is ready as the initialization takes place, but
> > that means there really aren't any property to give here
> >
> > (I haven't reproduced during normal boot, but in particular if I run
> > bluetoothd before loading the wifi driver, I need to unbind/bind the
> > serial device from the hci_uart_h4 driver to recover bluetooth...
> > With that in mind it might actually be best to try to coordinate this
> > from userspace with btattach after all, and I'd be happy with that if I
> > didn't have to fight our init system so much, but as things stand having
> > it autoloaded by the kernel is more convenient for us... Which is
> > admitedly a weak reason for you all, feel free to tell me this isn't
> > viable)

Punting the issue to userspace is not a great solution...


> This actually hasn't taken long to bite us: while the driver does work,
> we get error messages early on before the firmware is loaded.
> (In hindsight, I probably should have waited a few days before sending
> this...)
>
>
> My current workaround is to return EPROBE_DEFER until we can find a
> netdev with a known name in the init namespace, but that isn't really
> something I'd consider upstreamable for obvious reasons (interfaces can
> be renamed or moved to different namespaces so this is inherently racy
> and it's just out of place in BT code)

Can't you just try to access the BT h/w in some way and defer when that
fails?

Or perhaps use fw_devlink to create a dependency on the wifi node. I'm
not sure offhand how exactly you do that with a custom property.

Rob

2022-11-10 07:47:57

by Dominique Martinet

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4

Rob Herring wrote on Wed, Nov 09, 2022 at 04:00:05PM -0600:
> Punting the issue to userspace is not a great solution...

I can definitely agree with that :)

Userspace has the advantage of being easy to shove ugly things under the
rug, whereas I still have faint hope of keeping down the divergences we
have with upstream kernel... But that's about it.

If we can work out a solution here I'll be very happy.


Rob Herring wrote on Wed, Nov 09, 2022 at 04:00:05PM -0600:
> > This actually hasn't taken long to bite us: while the driver does work,
> > we get error messages early on before the firmware is loaded.
> > (In hindsight, I probably should have waited a few days before sending
> > this...)
> >
> >
> > My current workaround is to return EPROBE_DEFER until we can find a
> > netdev with a known name in the init namespace, but that isn't really
> > something I'd consider upstreamable for obvious reasons (interfaces can
> > be renamed or moved to different namespaces so this is inherently racy
> > and it's just out of place in BT code)
>
> Can't you just try to access the BT h/w in some way and defer when that
> fails?

This is just a serial link; I've tried poking at it a bit before the
firmware is loaded but mostly never got any reply, or while the driver
sometimes got garbage back at some point (baudrate not matching with
fresh boot default?)
Either way, no reply isn't great -- just waiting a few ms for reply or
not is not my idea of good design...

> Or perhaps use fw_devlink to create a dependency on the wifi node. I'm
> not sure offhand how exactly you do that with a custom property.

That sounds great if we can figure how to do that!
From what I can see this doesn't look possible to express in pure
devicetree, but I see some code initializing a fwnode manually in a
constructor function with fwnode_init and a fwnode_operations vector
that has .add_links, which in turn could add a link.
... My problem at this point would be that I currently load the wireless
driver as a module as it's vendor provided out of tree... (it's loaded
through its pci alias, I guess it's udev checking depmod infos? not
familiar how that part of autoloading really works...)

But that makes me think that rather than defining the bluetooth serdev
in dts early, I could try to have the wireless driver create it once
it's ready? hmm...

Let me sleep on that a bit and have another look at both fwnode
(fw_devlink) and dynamic device creation.


Cheers,
--
Dominique



2022-11-10 16:28:15

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4

On Thu, Nov 10, 2022 at 1:38 AM Dominique Martinet
<[email protected]> wrote:
>
> Rob Herring wrote on Wed, Nov 09, 2022 at 04:00:05PM -0600:
> > Punting the issue to userspace is not a great solution...
>
> I can definitely agree with that :)
>
> Userspace has the advantage of being easy to shove ugly things under the
> rug, whereas I still have faint hope of keeping down the divergences we
> have with upstream kernel... But that's about it.
>
> If we can work out a solution here I'll be very happy.
>
>
> Rob Herring wrote on Wed, Nov 09, 2022 at 04:00:05PM -0600:
> > > This actually hasn't taken long to bite us: while the driver does work,
> > > we get error messages early on before the firmware is loaded.
> > > (In hindsight, I probably should have waited a few days before sending
> > > this...)
> > >
> > >
> > > My current workaround is to return EPROBE_DEFER until we can find a
> > > netdev with a known name in the init namespace, but that isn't really
> > > something I'd consider upstreamable for obvious reasons (interfaces can
> > > be renamed or moved to different namespaces so this is inherently racy
> > > and it's just out of place in BT code)
> >
> > Can't you just try to access the BT h/w in some way and defer when that
> > fails?
>
> This is just a serial link; I've tried poking at it a bit before the
> firmware is loaded but mostly never got any reply, or while the driver
> sometimes got garbage back at some point (baudrate not matching with
> fresh boot default?)
> Either way, no reply isn't great -- just waiting a few ms for reply or
> not is not my idea of good design...
>
> > Or perhaps use fw_devlink to create a dependency on the wifi node. I'm
> > not sure offhand how exactly you do that with a custom property.
>
> That sounds great if we can figure how to do that!
> From what I can see this doesn't look possible to express in pure
> devicetree, but I see some code initializing a fwnode manually in a
> constructor function with fwnode_init and a fwnode_operations vector
> that has .add_links, which in turn could add a link.

If the wifi node was a standard provider (clocks, resets, etc.) to the
BT node, it does just work with DT. The issue here is either you'd
have some custom property or no property and the BT side driver just
knows there is a dependency to create. That case is what .add_links is
for IIRC.

> ... My problem at this point would be that I currently load the wireless
> driver as a module as it's vendor provided out of tree... (it's loaded
> through its pci alias, I guess it's udev checking depmod infos? not
> familiar how that part of autoloading really works...)

Well, that's a fun complication. I guess it has no DT info? You can
populate your DT with the necessary PCI nodes to represent the wifi
device. Under the PCI host node, you'll need at least a root port node
and then probably the wifi device is under that. It's got to match the
hierarchy to assign a device_node ptr to the PCI device.

Module aliases are the magic that makes the autoloading work.

> But that makes me think that rather than defining the bluetooth serdev
> in dts early, I could try to have the wireless driver create it once
> it's ready? hmm...

That is yet another option. The wireless driver could create the BT
device when ready. The issue there is serdev devices created
asynchronously isn't supported. serdev looks if the serial device has
a child node and will register with serdev and create the serdev
device. Otherwise, the serial device is bound to the tty layer.

Rob

2022-11-18 04:04:51

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add serdev support for hci h4

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=693092

---Test result---

Test Summary:
CheckPatch FAIL 1.76 seconds
GitLint PASS 0.52 seconds
SubjectPrefix FAIL 0.41 seconds
BuildKernel PASS 39.53 seconds
BuildKernel32 PASS 36.25 seconds
TestRunnerSetup PASS 490.82 seconds
TestRunner_l2cap-tester PASS 17.35 seconds
TestRunner_iso-tester PASS 17.53 seconds
TestRunner_bnep-tester PASS 6.16 seconds
TestRunner_mgmt-tester PASS 117.62 seconds
TestRunner_rfcomm-tester PASS 10.32 seconds
TestRunner_sco-tester PASS 9.66 seconds
TestRunner_ioctl-tester PASS 11.21 seconds
TestRunner_mesh-tester PASS 7.72 seconds
TestRunner_smp-tester PASS 9.39 seconds
TestRunner_userchan-tester PASS 6.36 seconds
IncrementalBuild PASS 41.59 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#114:
new file mode 100644

total: 0 errors, 1 warnings, 49 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/src/13035921.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: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject


---
Regards,
Linux Bluetooth

2022-11-18 04:41:52

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add serdev support for hci h4

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=693092

---Test result---

Test Summary:
CheckPatch FAIL 2.01 seconds
GitLint PASS 0.65 seconds
SubjectPrefix FAIL 0.53 seconds
BuildKernel PASS 46.06 seconds
BuildKernel32 PASS 39.72 seconds
TestRunnerSetup PASS 568.54 seconds
TestRunner_l2cap-tester PASS 19.32 seconds
TestRunner_iso-tester PASS 20.15 seconds
TestRunner_bnep-tester PASS 7.02 seconds
TestRunner_mgmt-tester PASS 134.74 seconds
TestRunner_rfcomm-tester PASS 12.36 seconds
TestRunner_sco-tester PASS 11.21 seconds
TestRunner_ioctl-tester PASS 13.41 seconds
TestRunner_mesh-tester PASS 9.47 seconds
TestRunner_smp-tester PASS 11.28 seconds
TestRunner_userchan-tester PASS 7.83 seconds
IncrementalBuild PASS 49.56 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#114:
new file mode 100644

total: 0 errors, 1 warnings, 49 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/src/13035921.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: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject


---
Regards,
Linux Bluetooth

2022-11-18 05:45:59

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add serdev support for hci h4

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=693092

---Test result---

Test Summary:
CheckPatch FAIL 2.02 seconds
GitLint PASS 0.61 seconds
SubjectPrefix FAIL 0.44 seconds
BuildKernel PASS 44.25 seconds
BuildKernel32 PASS 40.63 seconds
TestRunnerSetup PASS 551.67 seconds
TestRunner_l2cap-tester PASS 18.96 seconds
TestRunner_iso-tester PASS 19.44 seconds
TestRunner_bnep-tester PASS 6.87 seconds
TestRunner_mgmt-tester PASS 129.72 seconds
TestRunner_rfcomm-tester PASS 11.35 seconds
TestRunner_sco-tester PASS 10.58 seconds
TestRunner_ioctl-tester PASS 12.54 seconds
TestRunner_mesh-tester PASS 8.77 seconds
TestRunner_smp-tester PASS 10.44 seconds
TestRunner_userchan-tester PASS 7.12 seconds
IncrementalBuild PASS 47.85 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#114:
new file mode 100644

total: 0 errors, 1 warnings, 49 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/src/13035921.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: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject


---
Regards,
Linux Bluetooth

2022-11-18 06:40:10

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add serdev support for hci h4

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=693092

---Test result---

Test Summary:
CheckPatch FAIL 1.68 seconds
GitLint PASS 0.54 seconds
SubjectPrefix FAIL 0.48 seconds
BuildKernel PASS 35.18 seconds
BuildKernel32 PASS 31.18 seconds
TestRunnerSetup PASS 422.79 seconds
TestRunner_l2cap-tester PASS 15.68 seconds
TestRunner_iso-tester PASS 15.23 seconds
TestRunner_bnep-tester PASS 5.28 seconds
TestRunner_mgmt-tester PASS 103.68 seconds
TestRunner_rfcomm-tester PASS 9.17 seconds
TestRunner_sco-tester PASS 8.67 seconds
TestRunner_ioctl-tester PASS 9.94 seconds
TestRunner_mesh-tester PASS 6.74 seconds
TestRunner_smp-tester PASS 8.41 seconds
TestRunner_userchan-tester PASS 5.51 seconds
IncrementalBuild PASS 36.83 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#114:
new file mode 100644

total: 0 errors, 1 warnings, 49 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/src/13035921.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: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject


---
Regards,
Linux Bluetooth

2022-11-18 07:34:42

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add serdev support for hci h4

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=693092

---Test result---

Test Summary:
CheckPatch FAIL 2.05 seconds
GitLint PASS 0.63 seconds
SubjectPrefix FAIL 0.44 seconds
BuildKernel PASS 40.44 seconds
BuildKernel32 PASS 36.15 seconds
TestRunnerSetup PASS 498.78 seconds
TestRunner_l2cap-tester PASS 17.77 seconds
TestRunner_iso-tester PASS 18.03 seconds
TestRunner_bnep-tester PASS 6.29 seconds
TestRunner_mgmt-tester PASS 119.79 seconds
TestRunner_rfcomm-tester PASS 11.05 seconds
TestRunner_sco-tester PASS 10.03 seconds
TestRunner_ioctl-tester PASS 11.61 seconds
TestRunner_mesh-tester PASS 8.12 seconds
TestRunner_smp-tester PASS 9.85 seconds
TestRunner_userchan-tester PASS 6.71 seconds
IncrementalBuild PASS 43.72 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#114:
new file mode 100644

total: 0 errors, 1 warnings, 49 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/src/13035921.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: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject


---
Regards,
Linux Bluetooth

2022-11-18 08:44:01

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add serdev support for hci h4

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=693092

---Test result---

Test Summary:
CheckPatch FAIL 1.91 seconds
GitLint PASS 0.49 seconds
SubjectPrefix FAIL 0.48 seconds
BuildKernel PASS 43.13 seconds
BuildKernel32 PASS 38.50 seconds
TestRunnerSetup PASS 542.62 seconds
TestRunner_l2cap-tester PASS 18.80 seconds
TestRunner_iso-tester PASS 19.97 seconds
TestRunner_bnep-tester PASS 7.03 seconds
TestRunner_mgmt-tester PASS 130.08 seconds
TestRunner_rfcomm-tester PASS 11.34 seconds
TestRunner_sco-tester PASS 10.45 seconds
TestRunner_ioctl-tester PASS 12.19 seconds
TestRunner_mesh-tester PASS 8.57 seconds
TestRunner_smp-tester PASS 10.33 seconds
TestRunner_userchan-tester PASS 7.14 seconds
IncrementalBuild PASS 46.04 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#114:
new file mode 100644

total: 0 errors, 1 warnings, 49 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/src/13035921.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: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject


---
Regards,
Linux Bluetooth

2022-11-18 09:43:40

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add serdev support for hci h4

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=693092

---Test result---

Test Summary:
CheckPatch FAIL 1.90 seconds
GitLint PASS 0.68 seconds
SubjectPrefix FAIL 0.48 seconds
BuildKernel PASS 33.47 seconds
BuildKernel32 PASS 29.76 seconds
TestRunnerSetup PASS 416.59 seconds
TestRunner_l2cap-tester PASS 15.74 seconds
TestRunner_iso-tester PASS 15.05 seconds
TestRunner_bnep-tester PASS 5.26 seconds
TestRunner_mgmt-tester PASS 102.94 seconds
TestRunner_rfcomm-tester PASS 9.04 seconds
TestRunner_sco-tester PASS 8.50 seconds
TestRunner_ioctl-tester PASS 9.68 seconds
TestRunner_mesh-tester PASS 6.56 seconds
TestRunner_smp-tester PASS 8.37 seconds
TestRunner_userchan-tester PASS 5.46 seconds
IncrementalBuild PASS 35.86 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#114:
new file mode 100644

total: 0 errors, 1 warnings, 49 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/src/13035921.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: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject


---
Regards,
Linux Bluetooth