Skip to contentSkip to conversation

serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support

PATCH In review Ian W MORRISON 3 participants 5 messages Oct 8, 2017 – Oct 10, 2017 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 2/2 serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support

ACPI and DT both need SERIAL_DEV_CTRL_TTYPORT to work properly since SERIAL_DEV_CTRL_TTYPORT is the only controller implemented for serdev. This is only possible if serdev support is compiled in as the code hooks into TTY. Otherwise PM will silently break as the corresponding platform devices would no longer be registered and as the tty class device is also gone and hciattach (btattach) will also fail.

This patch set addresses this by making BT_HCIUART_BCM dependent on SERIAL_DEV_CTRL_TTYPORT which in turn is dependent on SERIAL_DEV_BUS and ensures that if SERIAL_DEV_BUS is selected is the code is build it.

---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/bluetooth/Kconfig +1 -0
index fae5a74dc737..8d432ee9f4bd 100644
@@ -171,6 +171,7 @@ config BT_HCIUART_BCM
 	depends on BT_HCIUART_SERDEV
 	select BT_HCIUART_H4
 	select BT_BCM
+	select SERIAL_DEV_CTRL_TTYPORT
 	help
 	  The Broadcom protocol support enables Bluetooth HCI over serial
 	  port interface for Broadcom Bluetooth controllers.
Signature · 1 line
2.11.0

A message that is not in the archive (sent off-list or not yet received): dc9cecc0-d9ef-109f-5f05-cf77ab16e60e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH v3 2/2 serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support

ACPI and DT both need SERIAL_DEV_CTRL_TTYPORT to work properly since SERIAL_DEV_CTRL_TTYPORT is the only controller implemented for serdev. This is only possible if serdev support is compiled in as the code hooks into TTY. Otherwise PM will silently break as the corresponding platform devices would no longer be registered and as the tty class device is also gone and hciattach (btattach) will also fail.

This patch set addresses this by making BT_HCIUART_BCM dependent on SERIAL_DEV_CTRL_TTYPORT which in turn is dependent on SERIAL_DEV_BUS and ensures that if SERIAL_DEV_BUS is selected is the code is build it.

---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/bluetooth/Kconfig +1 -0
index fae5a74dc737..8d432ee9f4bd 100644
@@ -171,6 +171,7 @@ config BT_HCIUART_BCM
 	depends on BT_HCIUART_SERDEV
 	select BT_HCIUART_H4
 	select BT_BCM
+	select SERIAL_DEV_CTRL_TTYPORT
 	help
 	  The Broadcom protocol support enables Bluetooth HCI over serial
 	  port interface for Broadcom Bluetooth controllers.
Signature · 1 line
2.11.0

A message that is not in the archive (sent off-list or not yet received): 427a95f6-feda-e93e-9a0f-a05b7b339ee6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw
Quoted 10 lines · Ian W MORRISON

ACPI and DT both need SERIAL_DEV_CTRL_TTYPORT to work properly since SERIAL_DEV_CTRL_TTYPORT is the only controller implemented for serdev. This is only possible if serdev support is compiled in as the code hooks into TTY. Otherwise PM will silently break as the corresponding platform devices would no longer be registered and as the tty class device is also gone and hciattach (btattach) will also fail.

This patch set addresses this by making BT_HCIUART_BCM dependent on SERIAL_DEV_CTRL_TTYPORT which in turn is dependent on SERIAL_DEV_BUS and ensures that if SERIAL_DEV_BUS is selected is the code is build it.

Ok, so you didn't even bother to write two distinct commit messages for your two patches, and my comments to the first patch apply also here.

Quoted 10 lines
---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/bluetooth/Kconfig +0 -0
index fae5a74dc737..8d432ee9f4bd 100644

drivers/bluetooth/Kconfig config BT_HCIUART_BCM · line 174

Quoted 4 lines
drivers/bluetooth/Kconfig +1 -0
@@ -171,6 +171,7 @@ config BT_HCIUART_BCM
 	depends on BT_HCIUART_SERDEV
 	select BT_HCIUART_H4
 	select BT_BCM
+	select SERIAL_DEV_CTRL_TTYPORT

I think

	depends on (!ACPI || SERIAL_DEV_CTRL_TTYPORT)

or just

depends on SERIAL_DEV_CTRL_TTYPORT

is what we want here, but that's still being discussed.

[ In general, select should be avoided as you could end up with options enabled without their dependencies also being enabled. In this case, we're fine as BT_HCIUART_BCM as depends on SERIAL_DEV_BUS via BT_HCIUART_SERDEV, and your first patch ruled out SERIAL_DEV_BUS=y, but that's not obvious. ]

drivers/bluetooth/Kconfig config BT_HCIUART_BCM · line 177

Quoted 3 lines
drivers/bluetooth/Kconfig +0 -0
 	help
 	  The Broadcom protocol support enables Bluetooth HCI over serial
 	  port interface for Broadcom Bluetooth controllers.

Johan

#5 lore raw
Quoted 1 line · Johan Hovold

On Mon, Oct 09, 2017 at 11:43:31AM +1100, Ian W MORRISON wrote:

<snip>

Quoted 8 lines
Quoted 4 lines

This patch set addresses this by making BT_HCIUART_BCM dependent on SERIAL_DEV_CTRL_TTYPORT which in turn is dependent on SERIAL_DEV_BUS and ensures that if SERIAL_DEV_BUS is selected is the code is build it.

Ok, so you didn't even bother to write two distinct commit messages for your two patches, and my comments to the first patch apply also here.

<snip>

Quoted 2 lines

Johan

Hi Johan,

My experience in submitting patches is still limited and I am very much learning so thanks for the helpful comments and apologies for trying your patience. My keenness on submitting patches was to show that I had tested my suggestions so as to given them credibility rather than any attempt to own the patch.

What I was trying to do here was to suggested two patches with one requiring the other. Rather than keep as a single patch affecting two files I separated into two patches attempting to create a patch series with a single changelog. This was the wrong approach and I may have misled so apologies for that.

Regards,
Ian

A message that is not in the archive (sent off-list or not yet received): CAFXWsS8=t9SfUdWPOSpmHt4-6cgdrVtQChryyzJ74XOQQP3-Ww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#7 lore raw
Quoted 15 lines · Ian W MORRISON
Quoted 1 line · Johan Hovold

On Mon, Oct 09, 2017 at 11:43:31AM +1100, Ian W MORRISON wrote:

<snip>

Quoted 8 lines
Quoted 4 lines

This patch set addresses this by making BT_HCIUART_BCM dependent on SERIAL_DEV_CTRL_TTYPORT which in turn is dependent on SERIAL_DEV_BUS and ensures that if SERIAL_DEV_BUS is selected is the code is build it.

Ok, so you didn't even bother to write two distinct commit messages for your two patches, and my comments to the first patch apply also here.

<snip>

Quoted 2 lines

Johan

Quoted 7 lines

Hi Johan,

My experience in submitting patches is still limited and I am very much learning so thanks for the helpful comments and apologies for trying your patience. My keenness on submitting patches was to show that I had tested my suggestions so as to given them credibility rather than any attempt to own the patch.

No worries. I can recommend taking a closer look at

Documentation/process/submitting-patches.rst

where some of the process is described.

Quoted 5 lines

What I was trying to do here was to suggested two patches with one requiring the other. Rather than keep as a single patch affecting two files I separated into two patches attempting to create a patch series with a single changelog. This was the wrong approach and I may have misled so apologies for that.

So next, time just submit your patches as a series (consider using git-send-email to get the threading right), where each patch is self-contained and has a good commit message describing why that change is needed. It is implicit that a series is to be applied in order and that therefore later patches in a series can depend on earlier ones. When a patch series span multiple subsystems, things can gets more complicated, though...

Johan