Convert all btwilink users to hci_ll and drop btwilink
Subsystems (5)
v2 cover Convert all btwilink users to hci_ll and drop btwilink
Hi,
This moves the remaining users of btwilink to the "new" serdev based hci_ll driver and drops the btwilink driver afterwards. The patches were only compile tested by me, but Enric tested the IGEP platform and Adam will test the LogicPD platform.
I kept the TI_ST driver for now, since I plan to send a second patchset for the FM radio driver. Once the FM driver has been converted to also use hci_ll, we can remove TI_ST completly.
My suggestion is for the patch handling is, that everything simply goes through Tony's tree.
Changes since PATCHv1 [0]
* rebase to 5.4-rc1
* move FM radio patches into separate patchset
[0] https://lore.kernel.org/lkml/[email protected]/
-- Sebastian
Sebastian Reichel (4):
ARM: dts: LogicPD Torpedo: Add WiLink UART node
ARM: dts: IGEP: Add WiLink UART node
ARM: OMAP2+: pdata-quirks: drop TI_ST/KIM support
Bluetooth: btwilink: drop superseded driver
.../boot/dts/logicpd-torpedo-37xx-devkit.dts | 8 + arch/arm/boot/dts/omap3-igep0020-rev-f.dts | 8 + arch/arm/boot/dts/omap3-igep0030-rev-g.dts | 8 + arch/arm/mach-omap2/pdata-quirks.c | 52 --- drivers/bluetooth/Kconfig | 11 - drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btwilink.c | 337 ------------------ 7 files changed, 24 insertions(+), 401 deletions(-) delete mode 100644 drivers/bluetooth/btwilink.c
Signature · 1 line
2.23.0
PATCH v2 1/4 ARM: dts: LogicPD Torpedo: Add WiLink UART node
From: Sebastian Reichel <[email protected]>
Add a node for the UART part of WiLink chip.
This is compile tested only!
--- arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts +8 -0
@@ -50,6 +50,14 @@ }; }; +&uart2 { + bluetooth { + compatible = "ti,wl1283-st"; + enable-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; /* gpio 162 */ + max-speed = <3000000>; + }; +}; + &omap3_pmx_core { mmc3_pins: pinmux_mm3_pins { pinctrl-single,pins = <
Signature · 1 line
2.23.0
Re: [PATCHv2 1/4] ARM: dts: LogicPD Torpedo: Add WiLink UART node
Quoted 4 lines · Sebastian Reichel
From: Sebastian Reichel <[email protected]>
Add a node for the UART part of WiLink chip.
Thank you.
hci0: Type: Primary Bus: UART
BD Address: 00:18:30:49:7D:63 ACL MTU: 1021:4 SCO MTU: 180:4
UP RUNNING
RX bytes:6185 acl:0 sco:0 events:581 errors:0
TX bytes:91006 acl:0 sco:0 commands:578 errors:0Quoted 3 lines
This is compile tested only!
I am not sure which is more appropriate,
Quoted 28 lines
Cc Adam Ford <[email protected]>Signed-off-by Sebastian Reichel <[email protected]>--- arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts +8
-1@@ -50,6 +50,14 @@ }; }; +&uart2 { + bluetooth { + compatible = "ti,wl1283-st"; + enable-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; /* gpio 162 */ + max-speed = <3000000>; + }; +}; + &omap3_pmx_core { mmc3_pins: pinmux_mm3_pins { pinctrl-single,pins = < --2.23.0
PATCH v2 2/4 ARM: dts: IGEP: Add WiLink UART node
In reply to Sebastian ReichelFrom: Sebastian Reichel <[email protected]>
Add a node for the UART part of WiLink chip.
--- arch/arm/boot/dts/omap3-igep0020-rev-f.dts | 8 ++++++++ arch/arm/boot/dts/omap3-igep0030-rev-g.dts | 8 ++++++++ 2 files changed, 16 insertions(+)
arch/arm/boot/dts/omap3-igep0020-rev-f.dts +8 -0
@@ -49,3 +49,11 @@ interrupts = <17 IRQ_TYPE_EDGE_RISING>; /* gpio 177 */ }; }; + +&uart2 { + bluetooth { + compatible = "ti,wl1835-st"; + enable-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>; /* gpio 137 */ + max-speed = <300000>; + }; +};
arch/arm/boot/dts/omap3-igep0030-rev-g.dts +8 -0
@@ -71,3 +71,11 @@ interrupts = <8 IRQ_TYPE_EDGE_RISING>; /* gpio 136 */ }; }; + +&uart2 { + bluetooth { + compatible = "ti,wl1835-st"; + enable-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>; /* gpio 137 */ + max-speed = <300000>; + }; +};
Signature · 1 line
2.23.0
PATCH v2 3/4 ARM: OMAP2+: pdata-quirks: drop TI_ST/KIM support
In reply to Sebastian ReichelFrom: Sebastian Reichel <[email protected]>
All TI_ST users have been migrated to the new serdev based HCILL bluetooth driver. That driver is initialized from DT and does not need any platform quirks.
--- arch/arm/mach-omap2/pdata-quirks.c | 52 ------------------------------ 1 file changed, 52 deletions(-)
arch/arm/mach-omap2/pdata-quirks.c +0 -52
@@ -11,7 +11,6 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/of_platform.h> -#include <linux/ti_wilink_st.h> #include <linux/wl12xx.h> #include <linux/mmc/card.h> #include <linux/mmc/host.h>
@@ -139,53 +138,6 @@ static void __init omap3_sbc_t3530_legacy_init(void)omap3_sbc_t3x_usb_hub_init (167 ,"sb-t35 usb hub" ); } -static struct ti_st_plat_data wilink_pdata = { - .nshutdown_gpio =137 , - .dev_name ="/dev/ttyO1" , - .flow_cntrl =1 , - .baud_rate =300000 , -}; - -static struct platform_device wl18xx_device = { - .name ="kim" , - .id =-1 , - .dev = { - .platform_data = &wilink_pdata, - } -}; - -static struct ti_st_plat_data wilink7_pdata = { - .nshutdown_gpio =162 , - .dev_name ="/dev/ttyO1" , - .flow_cntrl =1 , - .baud_rate =3000000 , -}; - -static struct platform_device wl128x_device = { - .name ="kim" , - .id =-1 , - .dev = { - .platform_data = &wilink7_pdata, - } -}; - -static struct platform_device btwilink_device = { - .name ="btwilink" , - .id =-1 , -}; - -static void __init omap3_igep0020_rev_f_legacy_init (void ) -{ -platform_device_register (&wl18xx_device); -platform_device_register (&btwilink_device); -} - -static void __init omap3_igep0030_rev_g_legacy_init (void ) -{ -platform_device_register (&wl18xx_device); -platform_device_register (&btwilink_device); -} -static void __init omap3_evm_legacy_init (void ) {hsmmc2_internal_input_clk ();
@@ -299,8 +251,6 @@ static void __init omap3_tao3530_legacy_init(void)static void __init omap3_logicpd_torpedo_init (void ) {omap3_gpio126_127_129 (); -platform_device_register (&wl128x_device); -platform_device_register (&btwilink_device); }/* omap3pandora legacy devices */
@@ -679,8 +629,6 @@ static struct pdata_init pdata_quirks[] __initdata = { { "nokia,omap3-n900", nokia_n900_legacy_init, }, { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, - { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, }, - { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, }, { "logicpd,dm3730-torpedo-devkit", omap3_logicpd_torpedo_init, }, { "ti,omap3-evm-37xx", omap3_evm_legacy_init, }, { "ti,am3517-evm", am3517_evm_legacy_init, },
Signature · 1 line
2.23.0
PATCH v2 4/4 Bluetooth: btwilink: drop superseded driver
In reply to Sebastian ReichelFrom: Sebastian Reichel <[email protected]>
All users of this driver have been converted to the serdev based hci_ll driver. The unused driver can be safely dropped now.
--- drivers/bluetooth/Kconfig | 11 -- drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btwilink.c | 337 ----------------------------------- 3 files changed, 349 deletions(-) delete mode 100644 drivers/bluetooth/btwilink.c
drivers/bluetooth/Kconfig +0 -11
@@ -380,17 +380,6 @@ config BT_ATH3K Say Y here to compile support for "Atheros firmware download driver" into the kernel or say M to compile it as module (ath3k). -config BT_WILINK - tristate "Texas Instruments WiLink7 driver" - depends on TI_ST - help - This enables the Bluetooth driver for Texas Instrument's BT/FM/GPS - combo devices. This makes use of shared transport line discipline - core driver to communicate with the BT core of the combo chip. - - Say Y here to compile support for Texas Instrument's WiLink7 driver - into the kernel or say M to compile it as module (btwilink). - config BT_MTKSDIO tristate "MediaTek HCI SDIO driver" depends on MMC
drivers/bluetooth/Makefile +0 -1
@@ -19,7 +19,6 @@ obj-$(CONFIG_BT_INTEL) += btintel.o obj-$(CONFIG_BT_ATH3K) += ath3k.o obj-$(CONFIG_BT_MRVL) += btmrvl.o obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o -obj-$(CONFIG_BT_WILINK) += btwilink.o obj-$(CONFIG_BT_MTKSDIO) += btmtksdio.o obj-$(CONFIG_BT_MTKUART) += btmtkuart.o obj-$(CONFIG_BT_QCOMSMD) += btqcomsmd.o
drivers/bluetooth/btwilink.c deleted +0 -337
337 lines not on this page · raw message
Signature · 1 line
2.23.0
Marcel Holtmann
maintainerRe: [PATCHv2 4/4] Bluetooth: btwilink: drop superseded driver
Hi Sebastian,
Quoted 10 lines
All users of this driver have been converted to the serdev based
hci_lldriver. The unused driver can be safely dropped now.Signed-off-by Sebastian Reichel <[email protected]>---
drivers/bluetooth/Kconfig | 11 -- drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btwilink.c | 337 ----------------------------------- 3 files changed, 349 deletions(-)delete mode 100644
drivers/bluetooth/btwilink.c
patch has been applied to bluetooth-next tree.
However what I really like to see is that you re-introduce a btwilink driver that is purely serdev based and doesn’t rely on any hci_uart/hci_ldisc code. A clean serdev only driver is that best and easier to maintain long term.
Regards
Marcel
Re: [PATCHv2 4/4] Bluetooth: btwilink: drop superseded driver
Hi,
Quoted 11 lines · Marcel Holtmann
Quoted 10 lines
All users of this driver have been converted to the serdev based
hci_lldriver. The unused driver can be safely dropped now.Signed-off-by Sebastian Reichel <[email protected]>---
drivers/bluetooth/Kconfig | 11 -- drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btwilink.c | 337 ----------------------------------- 3 files changed, 349 deletions(-)delete mode 100644
drivers/bluetooth/btwilink.c
Quoted 6 lines
patch has been applied to bluetooth-next tree.
However what I really like to see is that you re-introduce a btwilink driver that is purely serdev based and doesn’t rely on any hci_uart/hci_ldisc code. A clean serdev only driver is that best and easier to maintain long term.
So basically move the serdev implementation from hci_ll.c into its own driver and make hci_ll hci_uart based only? That effectively means, that we have two implementations of the protocol. I don't think this will improve maintainability, since then bugs needs to be fixed in two places? Note, that we have a couple of drivers with serdev+hci_uart by now:
for file in $(grep -l serdev drivers/bluetooth/hci_*c) ; grep -l hci_uart_register_proto "${file}" hci_bcm.chci_h5.chci_ldisc.chci_ll.chci_mrvl.chci_qca.c
-- Sebastian
Marcel Holtmann
maintainerRe: [PATCHv2 4/4] Bluetooth: btwilink: drop superseded driver
Hi Sebastian,
Quoted 25 lines
Quoted 11 lines
Quoted 10 lines
All users of this driver have been converted to the serdev based
hci_lldriver. The unused driver can be safely dropped now.Signed-off-by Sebastian Reichel <[email protected]>---
drivers/bluetooth/Kconfig | 11 -- drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btwilink.c | 337 ----------------------------------- 3 files changed, 349 deletions(-)delete mode 100644
drivers/bluetooth/btwilink.cQuoted 6 lines
patch has been applied to bluetooth-next tree.
However what I really like to see is that you re-introduce a btwilink driver that is purely serdev based and doesn’t rely on any hci_uart/hci_ldisc code. A clean serdev only driver is that best and easier to maintain long term.
So basically move the serdev implementation from
hci_ll.cinto its own driver and makehci_llhci_uartbased only? That effectively means, that we have two implementations of the protocol. I don't think this will improve maintainability, since then bugs needs to be fixed in two places? Note, that we have a couple of drivers with serdev+hci_uart by now:
Quoted 7 lines
for file in $(grep -l serdev
drivers/bluetooth/hci_*c) ; grep -lhci_uart_register_proto"${file}"hci_bcm.chci_h5.chci_ldisc.chci_ll.chci_mrvl.chci_qca.c
I would like to have something similar to btmtkuart.c which is a pure serdev driver that doesn’t depend on any hci_ldisc.c framework. If we have this, then we would just drop hci_ll.c from the kernel and focus on the serdev only version. As noted, there is no need for any other driver at that point since everything is probed anyway. Users will not even notice the difference.
Regards
Marcel
Re: [PATCHv2 4/4] Bluetooth: btwilink: drop superseded driver
Hi,
Quoted 35 lines · Marcel Holtmann
Hi Sebastian,
Quoted 25 lines
Quoted 11 lines
Quoted 10 lines
All users of this driver have been converted to the serdev based
hci_lldriver. The unused driver can be safely dropped now.Signed-off-by Sebastian Reichel <[email protected]>---
drivers/bluetooth/Kconfig | 11 -- drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btwilink.c | 337 ----------------------------------- 3 files changed, 349 deletions(-)delete mode 100644
drivers/bluetooth/btwilink.cQuoted 6 lines
patch has been applied to bluetooth-next tree.
However what I really like to see is that you re-introduce a btwilink driver that is purely serdev based and doesn’t rely on any hci_uart/hci_ldisc code. A clean serdev only driver is that best and easier to maintain long term.
So basically move the serdev implementation from
hci_ll.cinto its own driver and makehci_llhci_uartbased only? That effectively means, that we have two implementations of the protocol. I don't think this will improve maintainability, since then bugs needs to be fixed in two places? Note, that we have a couple of drivers with serdev+hci_uart by now:Quoted 7 lines
for file in $(grep -l serdev
drivers/bluetooth/hci_*c) ; grep -lhci_uart_register_proto"${file}"hci_bcm.chci_h5.chci_ldisc.chci_ll.chci_mrvl.chci_qca.c
Quoted 6 lines
I would like to have something similar to
btmtkuart.cwhich is a pure serdev driver that doesn’t depend on anyhci_ldisc.cframework. If we have this, then we would just drophci_ll.cfrom the kernel and focus on the serdev only version. As noted, there is no need for any other driver at that point since everything is probed anyway. Users will not even notice the difference.
This can be achieved by just removing the hci_uart part from hci_ll. But AFAIK there are some non-wilink based TI HCILL devices, which do not require any extra platform data and might still use the hci_uart part.
-- Sebastian
Marcel Holtmann
maintainerRe: [PATCHv2 4/4] Bluetooth: btwilink: drop superseded driver
Hi Sebastian,
Quoted 40 lines
Quoted 33 lines
Quoted 25 lines
Quoted 11 lines
Quoted 10 lines
All users of this driver have been converted to the serdev based
hci_lldriver. The unused driver can be safely dropped now.Signed-off-by Sebastian Reichel <[email protected]>---
drivers/bluetooth/Kconfig | 11 -- drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btwilink.c | 337 ----------------------------------- 3 files changed, 349 deletions(-)delete mode 100644
drivers/bluetooth/btwilink.cQuoted 6 lines
patch has been applied to bluetooth-next tree.
However what I really like to see is that you re-introduce a btwilink driver that is purely serdev based and doesn’t rely on any hci_uart/hci_ldisc code. A clean serdev only driver is that best and easier to maintain long term.
So basically move the serdev implementation from
hci_ll.cinto its own driver and makehci_llhci_uartbased only? That effectively means, that we have two implementations of the protocol. I don't think this will improve maintainability, since then bugs needs to be fixed in two places? Note, that we have a couple of drivers with serdev+hci_uart by now:Quoted 7 lines
for file in $(grep -l serdev
drivers/bluetooth/hci_*c) ; grep -lhci_uart_register_proto"${file}"hci_bcm.chci_h5.chci_ldisc.chci_ll.chci_mrvl.chci_qca.cQuoted 6 lines
I would like to have something similar to
btmtkuart.cwhich is a pure serdev driver that doesn’t depend on anyhci_ldisc.cframework. If we have this, then we would just drophci_ll.cfrom the kernel and focus on the serdev only version. As noted, there is no need for any other driver at that point since everything is probed anyway. Users will not even notice the difference.
Quoted 4 lines
This can be achieved by just removing the
hci_uartpart fromhci_ll. But AFAIK there are some non-wilink based TI HCILL devices, which do not require any extra platform data and might still use thehci_uartpart.
the hci_ldisc and hci_uart driver abstraction provides enqueue and dequeue handling that just needs to be removed and done natively in the serdev driver. This should be all straight forward and we can keep the current hci_ll.c around for a bit to see what users we have. However I really want to migrate everything over to native serdev drivers that are standalone. The TI HCILL is complex enough to warrant a separate driver.
Regards
Marcel
Tony Lindgren
maintainerQuoted 7 lines · Sebastian Reichel
Hi,
This moves the remaining users of btwilink to the "new" serdev based
hci_lldriver and drops the btwilink driver afterwards. The patches were only compile tested by me, but Enric tested the IGEP platform and Adam will test the LogicPD platform.
Quoted 6 lines
I kept the
TI_STdriver for now, since I plan to send a second patchset for the FM radio driver. Once the FM driver has been converted to also usehci_ll, we can removeTI_STcompletly.My suggestion is for the patch handling is, that everything simply goes through Tony's tree.
Sounds good to me, good to see kim gone with patch 3/4 :)
Marcel, care to ack the old driver removal patch?
Regards,
Tony
Quoted 27 lines
Changes since PATCHv1 [0]
* rebase to 5.4-rc1
* move FM radio patches into separate patchset[0] https://lore.kernel.org/lkml/[email protected]/
-- Sebastian
Sebastian Reichel (4):
ARM: dts: LogicPD Torpedo: Add WiLink UART node
ARM: dts: IGEP: Add WiLink UART node
ARM: OMAP2+: pdata-quirks: drop TI_ST/KIM support
Bluetooth: btwilink: drop superseded driver.../boot/dts/logicpd-torpedo-37xx-devkit.dts | 8 + arch/arm/boot/dts/omap3-igep0020-rev-f.dts | 8 + arch/arm/boot/dts/omap3-igep0030-rev-g.dts | 8 + arch/arm/mach-omap2/pdata-quirks.c | 52 --- drivers/bluetooth/Kconfig | 11 - drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btwilink.c | 337 ------------------ 7 files changed, 24 insertions(+), 401 deletions(-) delete mode 100644 drivers/bluetooth/btwilink.cSignature · 1 line
2.23.0
Hi Tony,
Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Sebastian Reichel
This moves the remaining users of btwilink to the "new" serdev based
hci_lldriver and drops the btwilink driver afterwards. The patches were only compile tested by me, but Enric tested the IGEP platform and Adam will test the LogicPD platform.I kept the
TI_STdriver for now, since I plan to send a second patchset for the FM radio driver. Once the FM driver has been converted to also usehci_ll, we can removeTI_STcompletly.
Quoted 6 lines
Quoted 2 lines
My suggestion is for the patch handling is, that everything simply goes through Tony's tree.
Sounds good to me, good to see kim gone with patch 3/4 :)
Marcel, care to ack the old driver removal patch?
Looks like Marcel missed the extra messages and merged the 4th patch, so I guess you can just merge patches 1-3. Technically that might lead to temporarily missing BT support on those two devices when the BT tree is merged before ARM tree during the merge window. Not a big issue I guess.
-- Sebastian
Tony Lindgren
maintainerQuoted 18 lines · Sebastian Reichel
Hi Tony,
Quoted 15 lines · Tony Lindgren
Quoted 11 lines · Sebastian Reichel
This moves the remaining users of btwilink to the "new" serdev based
hci_lldriver and drops the btwilink driver afterwards. The patches were only compile tested by me, but Enric tested the IGEP platform and Adam will test the LogicPD platform.I kept the
TI_STdriver for now, since I plan to send a second patchset for the FM radio driver. Once the FM driver has been converted to also usehci_ll, we can removeTI_STcompletly.My suggestion is for the patch handling is, that everything simply goes through Tony's tree.
Sounds good to me, good to see kim gone with patch 3/4 :)
Quoted 7 lines
Quoted 1 line
Marcel, care to ack the old driver removal patch?
Looks like Marcel missed the extra messages and merged the 4th patch, so I guess you can just merge patches 1-3. Technically that might lead to temporarily missing BT support on those two devices when the BT tree is merged before ARM tree during the merge window. Not a big issue I guess.
Sure no problem. Applying dts changes into omap-for-v5.5/dt and the pdata quirk removal to omap-for-v5.5/soc.
I guess ti_wilink_st.h will need some follow-up patch to remove unused platform data, but best to wait on that.
Regards,
Tony
Hi,
Quoted 19 lines · Tony Lindgren
Quoted 18 lines · Sebastian Reichel
Quoted 16 lines · Tony Lindgren
Quoted 11 lines · Sebastian Reichel
This moves the remaining users of btwilink to the "new" serdev based
hci_lldriver and drops the btwilink driver afterwards. The patches were only compile tested by me, but Enric tested the IGEP platform and Adam will test the LogicPD platform.I kept the
TI_STdriver for now, since I plan to send a second patchset for the FM radio driver. Once the FM driver has been converted to also usehci_ll, we can removeTI_STcompletly.My suggestion is for the patch handling is, that everything simply goes through Tony's tree.
Sounds good to me, good to see kim gone with patch 3/4 :)
Marcel, care to ack the old driver removal patch?
Quoted 8 lines
Quoted 5 lines
Looks like Marcel missed the extra messages and merged the 4th patch, so I guess you can just merge patches 1-3. Technically that might lead to temporarily missing BT support on those two devices when the BT tree is merged before ARM tree during the merge window. Not a big issue I guess.
Sure no problem. Applying dts changes into omap-for-v5.5/dt and the pdata quirk removal to omap-for-v5.5/soc.
Thanks.
Quoted 2 lines
I guess
ti_wilink_st.hwill need some follow-up patch to remove unused platform data, but best to wait on that.
The header will receive a cleanup in the patchset moving the FM driver from TI_ST to serdev based bluetooth driver. After that patchset most of the ti_wilink_st.h content can be removed.
-- Sebastian