Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp10188597ybl; Thu, 26 Dec 2019 12:31:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxTQM6qOc+JQwdeOrNR3dWWzMLpabkLzHolXrQGriLuGSPqIlOLkdci2oo7W7tcAFzwx2BW X-Received: by 2002:a9d:10d:: with SMTP id 13mr50140340otu.149.1577392276469; Thu, 26 Dec 2019 12:31:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577392276; cv=none; d=google.com; s=arc-20160816; b=BDNmdswEus7q3yVFe74cWCjL4c/AdzeRSLkxbHJxq8lUhKaeCdnjskiZ57/lOxSMsK u60TFGkuqb90+DF5eq0/XWSKzg35FUf8SLl5xE7zVKN5tvuK7bpJHjg7WziSJY1km8y6 AmJaRhOrBrBZuky6s7YKIsWFH8TnD07A/EcPHcIN+XlXYga85qpOftoMyOhWxYWijrkX JZa5BwXeRFBA+4bth60dNsaK/i9pFeCkpQt1/CsH9EmpEyQE0ChHWtJS7OWGVg49oepG QrLHniemic6CJxOi1bqcFqgvHuWGFcU7qxs2tVsjXnfgX3neF2piapyyE3yoiAADA0NQ UANg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=xIcyn4KihC0B92n8hnqVVYAeE1UpLW3IHCwWS8mU784=; b=VTv37SeEuZcigrgYSso6tyBjLj63ZYXHT5ejbZ3h+Utn1f+L9yyyWghAY8JP6pbcvP DF6cVtNV7iaztRmsaXge08kU4srJiF6XDByKylR/hwWZHmVEuW2oYHdvmhGgXtUFVycM Y+A8zK37yolm9SUEdwoo/N2bMHuH/qvYmTILS0BZSHf3LlhXWa8HFOOFB/FM6+qkbqQr XW+yyUodIUI/aH9QkKdpOaG6wIu/mw9n7C99hc3kU1ZLm2XRJDRTuPr1AGZyojvXTTgz fyzeZY9OXRR3sI0BFB/LsGuL82Nv40l1nygUkmPUtqWIddWKkWZZcw1zL9O0QuoTmLIA M+7g== 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 w7si14511687oie.196.2019.12.26.12.31.05; Thu, 26 Dec 2019 12:31:16 -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 S1726748AbfLZUao convert rfc822-to-8bit (ORCPT + 99 others); Thu, 26 Dec 2019 15:30:44 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:41615 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726653AbfLZUao (ORCPT ); Thu, 26 Dec 2019 15:30:44 -0500 Received: from [192.168.0.171] (188.147.97.8.nat.umts.dynamic.t-mobile.pl [188.147.97.8]) by mail.holtmann.org (Postfix) with ESMTPSA id AD5D2CECEC; Thu, 26 Dec 2019 21:39:56 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: [PATCH v2 3/4] Bluetooth: hci_qca: Enable power off/on support during hci down/up for QCA Rome From: Marcel Holtmann In-Reply-To: <20191226064554.16803-3-rjliao@codeaurora.org> Date: Thu, 26 Dec 2019 21:30:42 +0100 Cc: Johan Hedberg , linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <322B016A-8F88-4AE2-8E21-5A95263FCF81@holtmann.org> References: <20191225060317.5258-1-rjliao@codeaurora.org> <20191226064554.16803-1-rjliao@codeaurora.org> <20191226064554.16803-3-rjliao@codeaurora.org> To: Rocky Liao X-Mailer: Apple Mail (2.3608.40.2.2.4) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Rocky, > This patch registers hdev->shutdown() callback and also sets > HCI_QUIRK_NON_PERSISTENT_SETUP for QCA Rome. It will power-off the BT chip > during hci down and power-on/initialize the chip again during hci up. > > Signed-off-by: Rocky Liao > --- > > Changes in v2: None > > drivers/bluetooth/hci_qca.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index 45042aa27fa4..7e202041ed77 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -1300,6 +1300,11 @@ static int qca_setup(struct hci_uart *hu) > } else { > bt_dev_info(hdev, "ROME setup"); > if (hu->serdev) { > + /* Enable NON_PERSISTENT_SETUP QUIRK to ensure to > + * execute setup for every hci up. > + */ > + set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks); > + hu->hdev->shutdown = qca_power_off; why are you setting it in the ->setup callback and not in the ->probe callback? Regards Marcel