serdev: Update drivers/tty/serdev/Kconfig for ACPI support
Subsystems (4)
PATCH 1/1 serdev: Update drivers/tty/serdev/Kconfig for ACPI support
The current Kconfig for serdev is not compatible when adding ACPI support as it does not work when built as a module as it requires config SERIAL_DEV_CTRL_TTYPORT to be set. This patch makes serdev compiled into the kernel if selected so that config SERIAL_DEV_CTRL_TTYPORT can be correctly set if requiring ACPI support.
--- drivers/tty/serdev/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/tty/serdev/Kconfig +3 -2
@@ -2,7 +2,8 @@ # Serial bus device driver configuration # menuconfig SERIAL_DEV_BUS - tristate "Serial device bus" + bool "Serial device bus" + default y help Core support for devices connected via a serial port.
@@ -11,6 +12,6 @@ if SERIAL_DEV_BUS config SERIAL_DEV_CTRL_TTYPORT bool "Serial device TTY port controller" depends on TTY - depends on SERIAL_DEV_BUS != m + default y endif
Signature · 1 line
2.11.0
A message that is not in the archive (sent off-list or not yet received): a4051ac2-1156-751d-ec16-2dbbb30b9258-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 29 lines · Ian W MORRISON
The current
Kconfigfor serdev is not compatible when adding ACPI support as it does not work when built as a module as it requires configSERIAL_DEV_CTRL_TTYPORTto be set. This patch makes serdev compiled into the kernel if selected so that configSERIAL_DEV_CTRL_TTYPORTcan be correctly set if requiring ACPI support.--- drivers/tty/serdev/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/tty/serdev/Kconfig +3
-2@@ -2,7 +2,8 @@ # Serial bus device driver configuration # menuconfig SERIAL_DEV_BUS - tristate "Serial device bus" + bool "Serial device bus" + default y help Core support for devices connected via a serial port.@@ -11,6 +12,6 @@ if SERIAL_DEV_BUS config SERIAL_DEV_CTRL_TTYPORT bool "Serial device TTY port controller" depends on TTY - depends on SERIAL_DEV_BUS != m + default y endifSignature · 1 line
2.11.0
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch contains warnings and/or errors noticed by the scripts/checkpatch.pl tool.
- Your patch does not have a Signed-off-by: line. Please read the kernel file, Documentation/SubmittingPatches and resend it after adding that line. Note, the line needs to be in the body of the email, before the patch, not at the bottom of the patch or in the email signature.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
Marcel Holtmann
maintainerHi Ian,
Quoted 23 lines
The current
Kconfigfor serdev is not compatible when adding ACPI support as it does not work when built as a module as it requires configSERIAL_DEV_CTRL_TTYPORTto be set. This patch makes serdev compiled into the kernel if selected so that configSERIAL_DEV_CTRL_TTYPORTcan be correctly set if requiring ACPI support.
---drivers/tty/serdev/Kconfig| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/tty/serdev/Kconfig +0
-0@@ -2,7 +2,8 @@ # Serial bus device driver configuration #menuconfig
SERIAL_DEV_BUSdrivers/tty/serdev/Kconfig +2
-1- tristate "Serial device bus" + bool "Serial device bus" + default yhelp
Core support for devices connected via a serial port.drivers/tty/serdev/Kconfig +0
-0@@ -11,6 +12,6 @@ if SERIAL_DEV_BUSconfig
SERIAL_DEV_CTRL_TTYPORT
bool "Serial device TTY port controller"
depends on TTY
drivers/tty/serdev/Kconfig if SERIAL_DEV_BUS · line 15
Quoted 2 lines
drivers/tty/serdev/Kconfig +1
-1- depends on SERIAL_DEV_BUS != m + default y
actually we made hci_nokia.c be buildable as separate module. We might need to do the same for hci_bcm.c to avoid forcing SERIAL_DEV_BUS into a bool. Or you need to explain the reason behind this change a bit better.
Regards
Marcel
A message that is not in the archive (sent off-list or not yet received): D567DA4A-4443-4A88-B078-50EE458C822A-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org
Quoted 30 lines · Marcel Holtmann
Hi Ian,
Quoted 23 lines
The current
Kconfigfor serdev is not compatible when adding ACPI support as it does not work when built as a module as it requires configSERIAL_DEV_CTRL_TTYPORTto be set. This patch makes serdev compiled into the kernel if selected so that configSERIAL_DEV_CTRL_TTYPORTcan be correctly set if requiring ACPI support.
---drivers/tty/serdev/Kconfig| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/tty/serdev/Kconfig +0
-0@@ -2,7 +2,8 @@ # Serial bus device driver configuration #menuconfig
SERIAL_DEV_BUSdrivers/tty/serdev/Kconfig +2
-1- tristate "Serial device bus" + bool "Serial device bus" + default y help Core support for devices connected via a serial port.@@ -11,6 +12,6 @@ if SERIAL_DEV_BUSconfig
SERIAL_DEV_CTRL_TTYPORT
bool "Serial device TTY port controller"
depends on TTYdrivers/tty/serdev/Kconfig if SERIAL_DEV_BUS · line 15
Quoted 2 lines
drivers/tty/serdev/Kconfig +1
-1- depends on SERIAL_DEV_BUS != m + default yactually we made
hci_nokia.cbe buildable as separate module. We might need to do the same forhci_bcm.cto avoid forcingSERIAL_DEV_BUSinto a bool. Or you need to explain the reason behind this change a bit better.
Quoted 4 lines
Regards
Marcel
Hi Marcel,
For serdev to support for devices connected via a serial port such as a tty (for example an ACPI enumerated BT driver) its code hooks into TTY code meaning serdev can no longer be compiled as a module for this functionality to work. With CONFIG_SERIAL_DEV_BUS originally being defined as a tristate a provision was made when compiling serdev as a module to return ENODEV when trying to register a tty port. This provision still exists with CONFIG_SERIAL_DEV_BUS defined as a bool because CONFIG_SERIAL_DEV_CTRL_TTYPORT actually controls this.
My patch also aligns CONFIG_SERIAL_DEV_BUS (serdev) which provides "Core serial port support" to CONFIG_SERIAL_NONSTANDARD or "Non-standard serial port support" as this seems logical comparison. CONFIG_SERIAL_NONSTANDARD is a bool similar to how I've made CONFIG_SERIAL_DEV_BUS a bool.
Whilst it may be preferable to make hci_bcm.c buildable as separate module like hci_nokia.c I don't relate the 'modularity' of bluetooth drivers with the 'modularity' of a serial device bus as I see the latter more similar to PCI support or ACPI support.
Because of the link and/or cross-over between serial port support and tty support I believe serdev should be built-in rather than modularized if and when it is required.
If this better explains the reason for the patch I can resubmit with an updated changelog together with a signoff which I accidentally during editing.
Regards,
Ian
Quoted 10 lines · Ian W MORRISON
The current
Kconfigfor serdev is not compatible when adding ACPI support as it does not work when built as a module as it requires configSERIAL_DEV_CTRL_TTYPORTto be set. This patch makes serdev compiled into the kernel if selected so that configSERIAL_DEV_CTRL_TTYPORTcan be correctly set if requiring ACPI support.--- drivers/tty/serdev/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/tty/serdev/Kconfig +0
-0
drivers/tty/serdev/Kconfig line 6
Quoted 6 lines
drivers/tty/serdev/Kconfig +2
-1@@ -2,7 +2,8 @@ # Serial bus device driver configuration # menuconfig SERIAL_DEV_BUS - tristate "Serial device bus" + bool "Serial device bus" + default y
I understand why you want this (to prevent hci_bcm from breaking), but we should generally not have new entries default to y.
drivers/tty/serdev/Kconfig if SERIAL_DEV_BUS · line 15
Quoted 9 lines
drivers/tty/serdev/Kconfig +1
-1help Core support for devices connected via a serial port.@@ -11,6 +12,6 @@ if SERIAL_DEV_BUS config SERIAL_DEV_CTRL_TTYPORT bool "Serial device TTY port controller" depends on TTY - depends on SERIAL_DEV_BUS != m + default y
Same here.
It may be better to have BT_HCIUART_BCM depend on (or select?) SERIAL_DEV_CTRL_TTYPORT instead.
Johan
Marcel Holtmann
maintainerHi Johan,
Quoted 32 lines
Quoted 13 lines
The current
Kconfigfor serdev is not compatible when adding ACPI support as it does not work when built as a module as it requires configSERIAL_DEV_CTRL_TTYPORTto be set. This patch makes serdev compiled into the kernel if selected so that configSERIAL_DEV_CTRL_TTYPORTcan be correctly set if requiring ACPI support.
---drivers/tty/serdev/Kconfig| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/tty/serdev/Kconfig +0
-0@@ -2,7 +2,8 @@ # Serial bus device driver configuration #menuconfig
SERIAL_DEV_BUSdrivers/tty/serdev/Kconfig line 6
Quoted 3 lines
drivers/tty/serdev/Kconfig +2
-1- tristate "Serial device bus" + bool "Serial device bus" + default yI understand why you want this (to prevent
hci_bcmfrom breaking), but we should generally not have new entries default to y.drivers/tty/serdev/Kconfig if SERIAL_DEV_BUS · line 15
Quoted 9 lines
help
Core support for devices connected via a serial port.drivers/tty/serdev/Kconfig +0
-0@@ -11,6 +12,6 @@ if SERIAL_DEV_BUSconfig
SERIAL_DEV_CTRL_TTYPORT
bool "Serial device TTY port controller"
depends on TTYdrivers/tty/serdev/Kconfig +1
-1- depends on SERIAL_DEV_BUS != m + default ySame here.
Quoted 2 lines
It may be better to have
BT_HCIUART_BCMdepend on (or select?)SERIAL_DEV_CTRL_TTYPORTinstead.
if we move SERIAL_DEV_BUS to bool, then I would just have it be selected by BT_HCIUART_BCM. Frankly the SERIAL_DEV_BUS option is pretty hard to find in the kernel config. And if we depend on TTY, but then select SERIAL_DEV_BUS, I think that is a good compromise.
Regards
Marcel
Quoted 3 lines · Marcel Holtmann
Hi Johan,
Quoted 1 line
Quoted 1 line
The current
Kconfigfor serdev is not compatible when adding ACPI support as it does not work when built as a module as it requires configSERIAL_DEV_CTRL_TTYPORTto be set. This patch makes serdev compiled into the kernel if selected so that configSERIAL_DEV_CTRL_TTYPORTcan be correctly set if requiring ACPI support.
<snip>
Quoted 3 lines
Quoted 3 lines
I understand why you want this (to prevent
hci_bcmfrom breaking), but we should generally not have new entries default to y.
<snip>
Quoted 9 lines
Quoted 2 lines
It may be better to have
BT_HCIUART_BCMdepend on (or select?)SERIAL_DEV_CTRL_TTYPORTinstead.if we move
SERIAL_DEV_BUSto bool, then I would just have it be selected byBT_HCIUART_BCM. Frankly theSERIAL_DEV_BUSoption is pretty hard to find in the kernel config. And if we depend on TTY, but then selectSERIAL_DEV_BUS, I think that is a good compromise.Regards
Marcel
Hi,
Many thanks for everyone's comments on my earlier patch to Kconfigs for ACPI serdev support.
I've submitted a revised patch set which addresses the points raised 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.
Please can you review and let me know if any further changes are required?
Regards,
Ian
Quoted 34 lines · Marcel Holtmann
Hi Johan,
Quoted 32 lines
Quoted 13 lines
The current
Kconfigfor serdev is not compatible when adding ACPI support as it does not work when built as a module as it requires configSERIAL_DEV_CTRL_TTYPORTto be set. This patch makes serdev compiled into the kernel if selected so that configSERIAL_DEV_CTRL_TTYPORTcan be correctly set if requiring ACPI support.
---drivers/tty/serdev/Kconfig| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/tty/serdev/Kconfig +0
-0@@ -2,7 +2,8 @@ # Serial bus device driver configuration #menuconfig
SERIAL_DEV_BUSdrivers/tty/serdev/Kconfig line 6
Quoted 3 lines
drivers/tty/serdev/Kconfig +2
-1- tristate "Serial device bus" + bool "Serial device bus" + default yI understand why you want this (to prevent
hci_bcmfrom breaking), but we should generally not have new entries default to y.drivers/tty/serdev/Kconfig if SERIAL_DEV_BUS · line 15
Quoted 9 lines
help
Core support for devices connected via a serial port.drivers/tty/serdev/Kconfig +0
-0@@ -11,6 +12,6 @@ if SERIAL_DEV_BUSconfig
SERIAL_DEV_CTRL_TTYPORT
bool "Serial device TTY port controller"
depends on TTYdrivers/tty/serdev/Kconfig +1
-1- depends on SERIAL_DEV_BUS != m + default ySame here.
Quoted 7 lines
Quoted 2 lines
It may be better to have
BT_HCIUART_BCMdepend on (or select?)SERIAL_DEV_CTRL_TTYPORTinstead.if we move
SERIAL_DEV_BUSto bool, then I would just have it be selected byBT_HCIUART_BCM. Frankly theSERIAL_DEV_BUSoption is pretty hard to find in the kernel config. And if we depend on TTY, but then selectSERIAL_DEV_BUS, I think that is a good compromise.
The Bluetooth UART drivers already depend on on SERIAL_DEV_BUS (through BT_HCIUART_SERDEV). And the problem with BT_HCIUART_BCM is that the current ACPI devices really need SERIAL_DEV_CTRL_TTYPORT (and not just serdev core).
And we should probably try to avoid selecting options if we can (to avoid ending up with unmet dependencies).
Johan