Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4994333ybc; Tue, 26 Nov 2019 19:03:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxm9tVCNNOHdtpUKX7WnfvC6zNaTNY0/AMhxWSaDupbf4KN6oiGmmu07tiata3UDaHRTGMs X-Received: by 2002:a17:906:8595:: with SMTP id v21mr21849231ejx.28.1574823825261; Tue, 26 Nov 2019 19:03:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574823825; cv=none; d=google.com; s=arc-20160816; b=ci1bn989w62+BaikhuljF8cYJlfrml4IlqTI64zhNwQVchUbqogqQGTuvIzQjZ4rXS 4MCnkbG0yOA6I1m23CCPH781SIsWSd2VyaQ1ugTWCocjC1/Hea0S2Etj5uCJ7HY8wagq uvffZl6mhgQjgOpuCVRAaMG229E4AXr82eZtlhx2L1nWQkygfEPSMGpfRSwK0BCVceMr A7QORzXRx/3bOl5YYRmjKIA8DURI8CiyMEje3dKidtN3suP0SJZT8UFgYxeBXjdrCFQ8 pniCXvZD5iRTgvrdTOF6jz6LNXd0NrvYEpWTfiCqeJTPQKhapZWq/L6Jt3R8KPMW0Hah dwNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:authenticated-by; bh=0CMC2JMFhr4COR6XyuOU1MxuVubKAuf9MBslwGi6dBQ=; b=TbSQX2K07pWUYB0F4JNr5HX5PyoeMBP/7vWNd9cyX7cudt2T7AwDEsbKOf30tHWf1F aMLOc7txJP5P/3VTQ47wayEpfvLqBVqabBYxgcyETsh6nuR/UtuksHMbffzkg+dS90mK AHMc0rDR7W3cNTmCPOqkS5a2uGQLiNrIWfvOV7YEC7uYQ9ITropx6VcHnx927FzYfxu3 xXGnaDEKCugJPSsxAg9GSjqDn1x+YdsZMv1QtynqhePfJL5Sg5/FKmgiVH+IBUjmf5Hk UD8rjwPtgmhWOY41GobnchmC0lOGGPztvQD9bbM14osJ+WZwuPrU+urifAHLJYNVQgJI 4DJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si3371706edh.399.2019.11.26.19.03.02; Tue, 26 Nov 2019 19:03:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726546AbfK0DBk (ORCPT + 99 others); Tue, 26 Nov 2019 22:01:40 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:50564 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbfK0DBk (ORCPT ); Tue, 26 Nov 2019 22:01:40 -0500 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID xAR31C2b020528, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id xAR31C2b020528 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 27 Nov 2019 11:01:12 +0800 Received: from localhost.localdomain (172.21.83.238) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.468.0; Wed, 27 Nov 2019 11:01:11 +0800 From: To: CC: , , , , , , , Subject: [PATCH] Bluetooth: btusb: Edit the logical value for Realtek Bluetooth reset Date: Wed, 27 Nov 2019 11:01:07 +0800 Message-ID: <20191127030107.17604-1-max.chou@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.83.238] Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Max Chou It should be pull low and pull high on the physical line for the Realtek Bluetooth reset. gpiod_set_value_cansleep() takes ACTIVE_LOW status for the logical value settings, so the original commit should be corrected. Signed-off-by: Max Chou --- drivers/bluetooth/btusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 70e385987d41..82fb2e7b2892 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -552,9 +552,9 @@ static void btusb_rtl_cmd_timeout(struct hci_dev *hdev) } bt_dev_err(hdev, "Reset Realtek device via gpio"); - gpiod_set_value_cansleep(reset_gpio, 0); - msleep(200); gpiod_set_value_cansleep(reset_gpio, 1); + msleep(200); + gpiod_set_value_cansleep(reset_gpio, 0); } static inline void btusb_free_frags(struct btusb_data *data) -- 2.17.1