From patchwork Fri Jan 18 22:24:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 10771717 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5872C91E for ; Fri, 18 Jan 2019 22:24:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46A43300FA for ; Fri, 18 Jan 2019 22:24:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AF2D30873; Fri, 18 Jan 2019 22:24:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D2389300FA for ; Fri, 18 Jan 2019 22:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ADVkQFkGDcsZD4KZl1VypQwn34wk17UHdC9kWZE6zi4=; b=EtK1xd6txTMUpC bQMqI1p0elBhUglFP8XLgrVJY2IoSYg4hlXpcjEm6g9WNtNUfrG8DR+dLbhe9x00FA0FR6M43deWj TTcvIgzDLZw3otN7Fo8oEzU514PabhKzGi2uaobaTXLQZRzIUMNmm8DSV5ULtKG0gXcHlQk6OVm6p 4oJq2o8jprcjuwXFYdLdR9q38sJRxwZvJAvA5mqaidCSEhgS0ytoQvM5nu1BJDM24h7v2NHJ4BEkK kO0w8fsvnKjjOTtnYKyKdTQPopPNxb6g1+RsPiDrlGuIPHHiMnThUe6Tys3SITFYPld/myd68ZM1n bGqu56/F60qJbqTwmY1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkcZO-00083Q-7z; Fri, 18 Jan 2019 22:24:58 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkcZK-000819-Pu for linux-mediatek@lists.infradead.org; Fri, 18 Jan 2019 22:24:56 +0000 X-UUID: 515ffe61fadd4931b3f1c974f6031b1f-20190118 X-UUID: 515ffe61fadd4931b3f1c974f6031b1f-20190118 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 478161645; Fri, 18 Jan 2019 14:24:49 -0800 Received: from MTKMBS01N2.mediatek.inc (172.21.101.79) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 18 Jan 2019 14:24:48 -0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 19 Jan 2019 06:24:33 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 19 Jan 2019 06:24:33 +0800 From: To: , Subject: [PATCH v5 0/2] Bluetooth: btusb: Add protocol support for MediaTek USB devices Date: Sat, 19 Jan 2019 06:24:29 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-TM-SNTS-SMTP: 562029315093DF7899ACA35E1C718E38BBC465EBF0BD232DD94D8FEB153CBA602000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190118_142454_847745_B74DFC67 X-CRM114-Status: UNSURE ( 7.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-bluetooth@vger.kernel.org, Sean Wang , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Wang v5: * rebase to the latest code base. * change the subject prefix. * change the place the firmware located at. v4: * use new BTUSB_TX_WAIT_VND_EVT instead of BTMTKUSB_TX_WAIT_VND_EVT to avoid definition conflict and to fix bulk data transfer fails. * use the bluetooth-next as the base v3: add fixes and enhancements based on [1] * reuse flags and evt_skb btusb already had * add ctrl_anchor and the corresponding handling * apply mtk specific recv function * add more comments explaining wmt ctrl urbs behavior. [1] http://lists.infradead.org/pipermail/linux-mediatek/2018-August/014724.html v2: add fixes and enhancements based on [1] * include /sys/kernel/debug/usb/devices portion in the commit message. * turn default into n for config BT_HCIBTUSB_MTK in Kconfig * only add MediaTek support to btusb.c * drop cmd_sync callback usage * use __hci_cmd_send to send WMT commands * add wait event handling similar to what is being done in btmtkuart.c * submit a control IN URB similar to interrupt IN URB on demand for the WMT commands during setup * add cosmetic changes [1] http://lists.infradead.org/pipermail/linux-mediatek/2018-August/014650.html http://lists.infradead.org/pipermail/linux-mediatek/2018-August/014656.html v1: This adds the support of enabling MT7668U and MT7663U Bluetooth function running on the top of btusb driver. The patch also adds a newly created file mtkbt.c able to be reused independently from the transport type such as UART, USB and SDIO. Sean Wang (2): Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices drivers/bluetooth/Kconfig | 11 + drivers/bluetooth/btusb.c | 552 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 563 insertions(+)