Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp5022101imc; Mon, 25 Feb 2019 15:53:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IZNP2Jw4jSOOyW7ECXN8MKHgqe4d+0p1TC3vihhJpYd/2l03M5dDnrlzkq5x99hHPSQmu6S X-Received: by 2002:a62:e40d:: with SMTP id r13mr8266688pfh.11.1551138809829; Mon, 25 Feb 2019 15:53:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551138809; cv=none; d=google.com; s=arc-20160816; b=P8D/LYMLdTL8m1gtxEIepxUjqXKj3foczO1nG0T4dKGkJi0DvZqRvE4tY2HxEj/bpK 6OpRo6uy0WAvc+vRUP7SHvZtBVzy1g8sF1Hiy/NuFEHmFIVBtA4zRV6qcFX4Mws+enCA JWwm7FCq5Jwyy88rSVG55LVP4E7asJIxyJDMGJ2Gy/UJq1g65PQeuDmX6Cx5XbDSeVxi lH7D7h3i+STSQ7H59tO16GpcR3CNKRVV3Uset4ovp90MN1Ym53wftoUVp6TWbEbwbZe8 kdr5UBrkUg4RSl6f3ValatzJ1gptCccbKOVDgMeMUX7ULy8RVZB8a6LByfmaPTe6Rnn6 AvCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gysWhoNf4JCT38FdtN46+bbYRxGNbE83eDDRJXMPvAM=; b=sZnNmBNmCVtGI8LkDtK8NCQy634YRloqVIJhOUfqL6hS6EqLIJGWUsUVf9wgs+3iQT 8tqptV3H2A0O/X8hcYhzKbSzf/YyM1andG9/Z+oUJHpL/Nz9NNUoC6WBXSqAYwUkqCNH jud7703vfL2SKRipvuZkn1KkrG0hDwxqYNv/S/1IFMC9DicbT2ngZPeFrL9XfGngjjW5 MBSXtjaCYk0YDntVlgpdajFCnMIXV4n1aFxm0WhaXemb3jhjelogZkTMmeqdkrMaBJG0 zuxm4vOcHqOXbKm2UC9U9S3warivjAOvlCJ707q2yLYy8Z5tO6YyIWqyLqYfsIPre/u8 0T0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PSYhP03j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s76si8941095pfs.52.2019.02.25.15.53.15; Mon, 25 Feb 2019 15:53:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PSYhP03j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728666AbfBYXuU (ORCPT + 99 others); Mon, 25 Feb 2019 18:50:20 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:40808 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726974AbfBYXuU (ORCPT ); Mon, 25 Feb 2019 18:50:20 -0500 Received: by mail-pl1-f195.google.com with SMTP id bj4so5242293plb.7 for ; Mon, 25 Feb 2019 15:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gysWhoNf4JCT38FdtN46+bbYRxGNbE83eDDRJXMPvAM=; b=PSYhP03jg1qBlyreHg7rQEH/m6CK8wTDgQ7jPucQiuIOLSiYpwDsx/7mxHKImORVZs V7g4uzM/cAPgcCyFxSkocobWNjkL4ByaOVVZT6lal6d6Zl55Xq2nbZsw385jZzLMs3xN 1GNUAoLE9L9SEMMMZgn66jZgHT92dsNoi+Ko4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gysWhoNf4JCT38FdtN46+bbYRxGNbE83eDDRJXMPvAM=; b=SZyWoPfllV9XBSeCVYDElaUfTysQK0ZcgX2woHiC9FaehjtNN6QLK9vC5U2S67ufNd n9IH7BO4yWCH+ovtUX7OqCJCPUAG72JoUHVwsvWWXEh7qCGGTwsvbXLXB1YjeUQGhLne aKJJHCIHmZ67wfA566SSxnFTGg5J+yerUUypeUcHadDZ+tQrTqP7PmQg+AVdI6ew6hgN PoIrKfksRpTE4uHAILCLMk2znB86Cc4vjxDtICrF5rFIT1NQPdmLxU6i5MA/9qGKVXSK Y/xvSi+saDi/OBDiBWUSCUx/PS3KvcYeE3rhoZEn4TbEDVC3SZVXzLNc4FmMUdCRkovP aMEg== X-Gm-Message-State: AHQUAuaW5h21CXeNpj2azChiwNmW0x1fHAywJjjZHcQSE9um1hNjHrYY QFz4izPbSNby9MVqSrXShPgKaRigKto= X-Received: by 2002:a17:902:6804:: with SMTP id h4mr22951260plk.115.1551138619593; Mon, 25 Feb 2019 15:50:19 -0800 (PST) Received: from mka.mtv.corp.google.com ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id y7sm17522967pgf.42.2019.02.25.15.50.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 15:50:18 -0800 (PST) From: Matthias Kaehlcke To: Marcel Holtmann , Johan Hedberg Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Balakrishna Godavarthi , Matthias Kaehlcke Subject: [PATCH 0/3] Bluetooth: hci_qca: Add delay after power-off pulse Date: Mon, 25 Feb 2019 15:49:51 -0800 Message-Id: <20190225234954.82942-1-mka@chromium.org> X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Initialization of the QCA WCN3990 often fails at boot time: [ 15.205224] Bluetooth: hci0: setting up wcn3990 [ 17.341062] Bluetooth: hci0: command 0xfc00 tx timeout [ 22.101453] ERROR: Bluetooth initialization failed [ 25.337740] Bluetooth: hci0: Reading QCA version information failed (-110) A short delay after sending a power-off pulse (which is done immediately before sending a power-on pulse) fixes this. Also move the delays to qca_send_power_pulse(), since they are directly related with sending the pulses. Change the interface of qca_send_power_pulse() to receive a boolean instead of a power pulse command, this improves readability of the function with the delays added. Matthias Kaehlcke (3): Bluetooth: hci_qca: Pass boolean 'on/off' to qca_send_power_pulse() Bluetooth: hci_qca: Move boot delay to qca_send_power_pulse() Bluetooth: hci_qca: Add delay after power-off pulse drivers/bluetooth/hci_qca.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) -- 2.21.0.rc0.258.g878e2cd30e-goog