Skip to contentSkip to conversation

Staging: add USB MTK bluetooth driver

PATCH Superseded Cho, Yu-Chen 2 participants 4 messages May 2, 2013 – May 16, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: add USB MTK bluetooth driver

From: "Cho, Yu-Chen" <[email protected]>

This driver is for the Mediatek Bluetooth that can be found in many different laptops. It was written by Mediatek, but cleaned up to work properly in the kernel tree by SUSE.

---
 drivers/staging/Kconfig               |    2 +
 drivers/staging/Makefile              |    1 +
 drivers/staging/btmtk_usb/Kconfig     |   11 +
 drivers/staging/btmtk_usb/Makefile    |    1 +
 drivers/staging/btmtk_usb/README      |   14 +
 drivers/staging/btmtk_usb/TODO        |    9 +
 drivers/staging/btmtk_usb/btmtk_usb.c | 1793 +++++++++++++++++++++++++++++++++
 drivers/staging/btmtk_usb/btmtk_usb.h |  138 +++
 8 files changed, 1969 insertions(+)
 create mode 100644 drivers/staging/btmtk_usb/Kconfig
 create mode 100644 drivers/staging/btmtk_usb/Makefile
 create mode 100644 drivers/staging/btmtk_usb/README
 create mode 100644 drivers/staging/btmtk_usb/TODO
 create mode 100644 drivers/staging/btmtk_usb/btmtk_usb.c
 create mode 100644 drivers/staging/btmtk_usb/btmtk_usb.h
drivers/staging/Kconfig +2 -0
index 093f10c..fe8dec0 100644
@@ -140,4 +140,6 @@ source "drivers/staging/zcache/Kconfig"
 
 source "drivers/staging/goldfish/Kconfig"
 
+source "drivers/staging/btmtk_usb/Kconfig"
+
 endif # STAGING
drivers/staging/Makefile +1 -0
index fa41b04..e33cfe0 100644
@@ -62,3 +62,4 @@ obj-$(CONFIG_SB105X)		+= sb105x/
 obj-$(CONFIG_FIREWIRE_SERIAL)	+= fwserial/
 obj-$(CONFIG_ZCACHE)		+= zcache/
 obj-$(CONFIG_GOLDFISH)		+= goldfish/
+obj-$(CONFIG_USB_BTMTK)		+= btmkt_usb/
drivers/staging/btmtk_usb/Kconfig new file +11 -0
new file mode 100644
index 0000000..a425ebd
@@ -0,0 +1,11 @@
+config USB_BTMTK
+	tristate "Mediatek Bluetooth support"
+	depends on USB && BT && m
+	---help---
+	  Say Y here if you wish to control a MTK USB Bluetooth.
+
+	  This option depends on 'USB' support being enabled
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called btmtk_usb.
+
drivers/staging/btmtk_usb/Makefile new file +1 -0
new file mode 100644
index 0000000..4d6c9d7
@@ -0,0 +1 @@
+obj-$(CONFIG_USB_BTMTK)	+= btmtk_usb.o
drivers/staging/btmtk_usb/README new file +14 -0
new file mode 100644
index 0000000..c046c8e
@@ -0,0 +1,14 @@
+-build driver modules
+	make
+
+-install driver modules
+	make install
+
+-remove driver modules
+	make clean
+
+-dynamic debug message
+	turn on CONFIG_DYNAMIC_DEBUG compiler flag for current kernel
+	mount -t debugfs none /sys/kernel/debug/
+	echo "module module_name +p" > /sys/kernel/debug/dynamic_debug/control(turn on debug messages, module name such as btmtk_usb)
+	echo "module module_name -p" > /sys/kernel/debug/dynamic_debug/control(turn off debug messages, module name such as btmtk_usb)
drivers/staging/btmtk_usb/TODO new file +9 -0
new file mode 100644
index 0000000..30fddde
@@ -0,0 +1,9 @@
+TODO:
+        - checkpatch.pl clean
+	- determine if the driver should not be using a duplicate
+          version of the usb-bluetooth interface code, but should
+          be merged into the drivers/bluetooth/ directory and
+          infrastructure instead.
+	- review by the bluetooth developer community
+
+Please send any patches for this driver to Yu-Chen, Cho <[email protected]> and
drivers/staging/btmtk_usb/btmtk_usb.c new file +1793 -0

1,793 lines not on this page · raw message

drivers/staging/btmtk_usb/btmtk_usb.h new file +138 -0

138 lines not on this page · raw message

Signature · 1 line
1.8.1.4
maintainer
#1 lore raw

drivers/staging/btmtk_usb/btmtk_usb.c

Quoted 13 lines · Yu-Chen
drivers/staging/btmtk_usb/TODO new file +9 -0
@@ -0,0 +1,9 @@
+TODO:
+	- checkpatch.pl clean
+	- determine if the driver should not be using a duplicate
+	   version of the usb-bluetooth interface code, but should
+	   be merged into the drivers/bluetooth/ directory and
+	   infrastructure instead.
+	- review by the bluetooth developer community
+
+Please send any patches for this driver to Yu-Chen, Cho <[email protected]> and
drivers/staging/btmtk_usb/btmtk_usb.c +0 -0

I think you forgot to write the last line of this TODO file :)

Care to send a follow-on patch to fix this up?

thanks,

greg k-h

maintainer
#2 lore raw
In reply to Cho, Yu-Chen

drivers/staging/Makefile obj-$(CONFIG_SB105X) += sb105x/ · line 65

Quoted 9 lines · Yu-Chen
drivers/staging/Makefile +1 -0
index fa41b04..e33cfe0 100644
@@ -62,3 +62,4 @@ obj-$(CONFIG_SB105X)		+= sb105x/
 obj-$(CONFIG_GOLDFISH)		+= goldfish/
 obj-$(CONFIG_USB_DWC2)		+= dwc2/
 obj-$(CONFIG_LUSTRE_FS)		+= lustre/
+obj-$(CONFIG_USB_BTMTK)		+= btmkt_usb/

You didn't actually test this patch, it breaks the build:

scripts/Makefile.build:44:
/home/gregkh/linux/work/staging/drivers/staging/btmkt_usb/Makefile: No such file or directory make[3]: *** No rule to make target `/home/gregkh/linux/work/staging/drivers/staging/btmkt_usb/Makefile'. Stop.

Please refresh this against 3.10-rc1 and test that it builds properly and then resend it.

thanks,

greg k-h

#3 lore raw

Hi Greg,

Quoted 13 lines · Greg KH

drivers/staging/Makefile obj-$(CONFIG_SB105X) += sb105x/ · line 65

Quoted 9 lines · Yu-Chen
drivers/staging/Makefile +1 -0
index fa41b04..e33cfe0 100644
@@ -62,3 +62,4 @@ obj-$(CONFIG_SB105X)		+= sb105x/
 obj-$(CONFIG_GOLDFISH)		+= goldfish/
 obj-$(CONFIG_USB_DWC2)		+= dwc2/
 obj-$(CONFIG_LUSTRE_FS)		+= lustre/
+obj-$(CONFIG_USB_BTMTK)		+= btmkt_usb/

You didn't actually test this patch, it breaks the build:

Quoted 8 lines

scripts/Makefile.build:44:
/home/gregkh/linux/work/staging/drivers/staging/btmkt_usb/Makefile: No such file or directory make[3]: *** No rule to make target `/home/gregkh/linux/work/staging/drivers/staging/btmkt_usb/Makefile'. Stop.

Please refresh this against 3.10-rc1 and test that it builds properly and then resend it.

Yes, I found that , and I will refresh this against 3.10-rc1 and test that it builds then resend it soon.

Thanks a lot.

Sincerely,
AL