From patchwork Thu Jan 24 23:26:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 10780303 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 561041390 for ; Thu, 24 Jan 2019 23:27:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F67E2F10B for ; Thu, 24 Jan 2019 23:27:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 283B72F0D3; Thu, 24 Jan 2019 23:27:20 +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 BFB612F0D3 for ; Thu, 24 Jan 2019 23:27:19 +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=F46HMN/pC/WwBNKDMEBAzfHO9aVBTs3wlz3PQvqvabM=; b=RoeYGO7nFLe+V5 wld+FO+4sAoDwlJAveyIeRvnYVTAT4eUYEabWyHVgkFvJ0+BNuwJqOnytNFnrJ1fiyd62b1xuYcw/ xvUOOeGWT+0LRpIc0Qt9C0kijRmAdmKdwmQP57dLYUr7t6t8of3PNDHM0AUL20CHA1Gcr4iZvrPyT Jc44o0ObAquKaaD6nwwDf6soyuUoBwX/kvqyNFxtR1vi0zv2UCZdy1b6H8/u6XCuImuRQ5JtOpHXZ 41b5siqc2L5whmdWdXyFY5SC+aJSjUxh351kmFPxb/irk62G1DGjfGrUoyBm8uXc9Mw/hlY437MNz ocidwOVw00mDvUM2R/yw==; 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 1gmoP0-0005uN-MA; Thu, 24 Jan 2019 23:27:18 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmoOx-0005sv-Ap for linux-mediatek@lists.infradead.org; Thu, 24 Jan 2019 23:27:16 +0000 X-UUID: 6d7504198bde4296be0f42b8e6e9550d-20190124 X-UUID: 6d7504198bde4296be0f42b8e6e9550d-20190124 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1905448079; Thu, 24 Jan 2019 15:27:10 -0800 Received: from MTKMBS01N1.mediatek.inc (172.21.101.68) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 24 Jan 2019 15:27:08 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 25 Jan 2019 07:26:54 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 25 Jan 2019 07:26:54 +0800 From: To: , Subject: [PATCH v6 0/2] Bluetooth: btusb: Add protocol support for MediaTek USB devices Date: Fri, 25 Jan 2019 07:26:46 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190124_152715_372412_06004255 X-CRM114-Status: UNSURE ( 8.21 ) 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 v6: * fix drivers/bluetooth/btusb.c:2683:2-3: Unneeded semicolon based reported by [1] * update power-on sequence with adding neccesary tci sleep comand to set up low-power environmnet and a delay to wait the device to be stable. * sort variables declarations in reverse xmas order. [1] http://lists.infradead.org/pipermail/linux-mediatek/2019-January/017017.html v5: * rebase to 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 | 581 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 592 insertions(+)