All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support
@ 2017-10-08  3:20 Ian W MORRISON
       [not found] ` <dc9cecc0-d9ef-109f-5f05-cf77ab16e60e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Ian W MORRISON @ 2017-10-08  3:20 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hovold, gustavo, johan.hedberg,
	linux-bluetooth, Hans de Goede, frederic.danis.oss, robh, sre,
	loic.poulain, Lukas Wunner, linux-serial, linux-acpi, rafael,
	Greg Kroah-Hartman

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.

Signed-off-by: Ian W MORRISON <ianwmorrison@gmail.com>
---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index fae5a74dc737..8d432ee9f4bd 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -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.
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v3 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support
  2017-10-08  3:20 [PATCH v2 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support Ian W MORRISON
@ 2017-10-09  0:43     ` Ian W MORRISON
  0 siblings, 0 replies; 8+ messages in thread
From: Ian W MORRISON @ 2017-10-09  0:43 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hovold, gustavo-THi1TnShQwVAfugRpC6u6w,
	johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, Hans de Goede,
	frederic.danis.oss-Re5JQEeQqe8AvxtiuMwx3w,
	robh-DgEjT+Ai2ygdnm+yROfE0A, sre-DgEjT+Ai2ygdnm+yROfE0A,
	loic.poulain-Re5JQEeQqe8AvxtiuMwx3w, Lukas Wunner,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA, rafael-DgEjT+Ai2ygdnm+yROfE0A,
	Greg Kroah-Hartman

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.

Signed-off-by: Ian W MORRISON <ianwmorrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index fae5a74dc737..8d432ee9f4bd 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -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.
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v3 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support
@ 2017-10-09  0:43     ` Ian W MORRISON
  0 siblings, 0 replies; 8+ messages in thread
From: Ian W MORRISON @ 2017-10-09  0:43 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hovold, gustavo, johan.hedberg,
	linux-bluetooth, Hans de Goede, frederic.danis.oss, robh, sre,
	loic.poulain, Lukas Wunner, linux-serial, linux-acpi, rafael,
	Greg Kroah-Hartman

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.

Signed-off-by: Ian W MORRISON <ianwmorrison@gmail.com>
---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index fae5a74dc737..8d432ee9f4bd 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -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.
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support
  2017-10-09  0:43     ` Ian W MORRISON
@ 2017-10-09  8:06         ` Johan Hovold
  -1 siblings, 0 replies; 8+ messages in thread
From: Johan Hovold @ 2017-10-09  8:06 UTC (permalink / raw)
  To: Ian W MORRISON
  Cc: Marcel Holtmann, Johan Hovold, gustavo-THi1TnShQwVAfugRpC6u6w,
	johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, Hans de Goede,
	frederic.danis.oss-Re5JQEeQqe8AvxtiuMwx3w,
	robh-DgEjT+Ai2ygdnm+yROfE0A, sre-DgEjT+Ai2ygdnm+yROfE0A,
	loic.poulain-Re5JQEeQqe8AvxtiuMwx3w, Lukas Wunner,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA, rafael-DgEjT+Ai2ygdnm+yROfE0A,
	Greg Kroah-Hartman

On Mon, Oct 09, 2017 at 11:43:31AM +1100, Ian W MORRISON wrote:
> 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.

> Signed-off-by: Ian W MORRISON <ianwmorrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/bluetooth/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
> index fae5a74dc737..8d432ee9f4bd 100644
> --- a/drivers/bluetooth/Kconfig
> +++ b/drivers/bluetooth/Kconfig
> @@ -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. ]

>  	help
>  	  The Broadcom protocol support enables Bluetooth HCI over serial
>  	  port interface for Broadcom Bluetooth controllers.

Johan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support
@ 2017-10-09  8:06         ` Johan Hovold
  0 siblings, 0 replies; 8+ messages in thread
From: Johan Hovold @ 2017-10-09  8:06 UTC (permalink / raw)
  To: Ian W MORRISON
  Cc: Marcel Holtmann, Johan Hovold, gustavo, johan.hedberg,
	linux-bluetooth, Hans de Goede, frederic.danis.oss, robh, sre,
	loic.poulain, Lukas Wunner, linux-serial, linux-acpi, rafael,
	Greg Kroah-Hartman

On Mon, Oct 09, 2017 at 11:43:31AM +1100, Ian W MORRISON wrote:
> 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.

> Signed-off-by: Ian W MORRISON <ianwmorrison@gmail.com>
> ---
>  drivers/bluetooth/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
> index fae5a74dc737..8d432ee9f4bd 100644
> --- a/drivers/bluetooth/Kconfig
> +++ b/drivers/bluetooth/Kconfig
> @@ -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. ]

>  	help
>  	  The Broadcom protocol support enables Bluetooth HCI over serial
>  	  port interface for Broadcom Bluetooth controllers.

Johan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support
  2017-10-09  8:06         ` Johan Hovold
  (?)
@ 2017-10-10  7:16         ` Ian W MORRISON
       [not found]           ` <CAFXWsS8=t9SfUdWPOSpmHt4-6cgdrVtQChryyzJ74XOQQP3-Ww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  -1 siblings, 1 reply; 8+ messages in thread
From: Ian W MORRISON @ 2017-10-10  7:16 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Marcel Holtmann, Gustavo F. Padovan, Johan Hedberg,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	Hans de Goede, Frédéric Danis, Rob Herring,
	Sebastian Reichel, Loic Poulain, Lukas Wunner, linux-serial,
	linux-acpi, Rafael J. Wysocki, Greg Kroah-Hartman

On 9 October 2017 at 19:06, Johan Hovold <johan@kernel.org> wrote:
> On Mon, Oct 09, 2017 at 11:43:31AM +1100, Ian W MORRISON wrote:
<snip>
>>
>> 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>
>
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support
  2017-10-10  7:16         ` Ian W MORRISON
@ 2017-10-10  8:11               ` Johan Hovold
  0 siblings, 0 replies; 8+ messages in thread
From: Johan Hovold @ 2017-10-10  8:11 UTC (permalink / raw)
  To: Ian W MORRISON
  Cc: Johan Hovold, Marcel Holtmann, Gustavo F. Padovan, Johan Hedberg,
	bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Hans de Goede, Frédéric Danis, Rob Herring,
	Sebastian Reichel, Loic Poulain, Lukas Wunner,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Greg Kroah-Hartman

On Tue, Oct 10, 2017 at 06:16:46PM +1100, Ian W MORRISON wrote:
> On 9 October 2017 at 19:06, Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> > On Mon, Oct 09, 2017 at 11:43:31AM +1100, Ian W MORRISON wrote:
> <snip>
> >>
> >> 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>
> >
> > 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.

No worries. I can recommend taking a closer look at

	Documentation/process/submitting-patches.rst

where some of the process is described.

> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support
@ 2017-10-10  8:11               ` Johan Hovold
  0 siblings, 0 replies; 8+ messages in thread
From: Johan Hovold @ 2017-10-10  8:11 UTC (permalink / raw)
  To: Ian W MORRISON
  Cc: Johan Hovold, Marcel Holtmann, Gustavo F. Padovan, Johan Hedberg,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	Hans de Goede, Frédéric Danis, Rob Herring,
	Sebastian Reichel, Loic Poulain, Lukas Wunner, linux-serial,
	linux-acpi, Rafael J. Wysocki, Greg Kroah-Hartman

On Tue, Oct 10, 2017 at 06:16:46PM +1100, Ian W MORRISON wrote:
> On 9 October 2017 at 19:06, Johan Hovold <johan@kernel.org> wrote:
> > On Mon, Oct 09, 2017 at 11:43:31AM +1100, Ian W MORRISON wrote:
> <snip>
> >>
> >> 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>
> >
> > 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.

No worries. I can recommend taking a closer look at

	Documentation/process/submitting-patches.rst

where some of the process is described.

> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-10  8:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08  3:20 [PATCH v2 2/2] serdev: Update drivers/bluetooth/Kconfig for ACPI serdev support Ian W MORRISON
     [not found] ` <dc9cecc0-d9ef-109f-5f05-cf77ab16e60e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-09  0:43   ` [PATCH v3 " Ian W MORRISON
2017-10-09  0:43     ` Ian W MORRISON
     [not found]     ` <427a95f6-feda-e93e-9a0f-a05b7b339ee6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-09  8:06       ` Johan Hovold
2017-10-09  8:06         ` Johan Hovold
2017-10-10  7:16         ` Ian W MORRISON
     [not found]           ` <CAFXWsS8=t9SfUdWPOSpmHt4-6cgdrVtQChryyzJ74XOQQP3-Ww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-10  8:11             ` Johan Hovold
2017-10-10  8:11               ` Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.