Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp5021798imc; Mon, 25 Feb 2019 15:52:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ8knSJ1PXJ/ol4/Tw5leYHwnf7eS7rUeJaGSqBPXQj1oPULULmZijHDxflLct+jY8/2E/r X-Received: by 2002:a65:5c46:: with SMTP id v6mr21427899pgr.309.1551138776955; Mon, 25 Feb 2019 15:52:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551138776; cv=none; d=google.com; s=arc-20160816; b=p9hqbX9LyJeeun3V4XgnX27JoBKmzutwfwWYgmDFSXXx+syOlPHkAmct6+riOPwY2w VCNb88wYDB0Cgbiu85qb4utGEgNwSXKDkr7SgDnLPaPBQreREaH4TbkbGTepTtVsfzg4 AYOiH6BHop/rsfoJm/iOecxdz2+j9Hx7RkBSUWs4bBzR+swiOhn8u2iJSzTaTr/o67bc CxAZnd/1/j7s7Wb9QUx/dhZ/LX4pFgVSNm6U1mSOHG5eLDXN0rCab7yx+MMjFs0iOlXF nz6O1J3ZyiWskcYq5V8WuZZzwfwy6SuXxfXdimE8dRE+7X2EggpSBP6lIaDV+cDbReIl B3og== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=18FsJ3EIYqY47G5XG6Ckl0/smQnwz5gVJaP2swZATXU=; b=T8w3XM5wdvDPG9BI/0x0bIZKK2fSdtn6tkie2YsOXih+K91CUgLZuStIgAB1IZpZcx BjYSkO0ia5NVACdDKuCMdhCK81yFF+yEUph+s1XXrYjLX6XHVi47BacnotjRdkY2XPg/ POJP9k8Ar5hgAq6P34/rR5gVw59/6SSnCZoCtfIxYs58e7tZGZGiIgIFR4NYy7C86ClP e93k0oI6cr3MFqSZb6aB141e+YXvxUVYNfMrLLTA/NGvNBDJ1kqauDUTYzgaqOEWpOEX i4IZeqcZ3cnozOaOT9g1BcUsVibcPKUPBvoa94WKWZWEdnxTbIM6OUbwLKUuhGPA4xnS erdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="A/ltSMPa"; 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 h3si10983679pfd.250.2019.02.25.15.52.41; Mon, 25 Feb 2019 15:52:56 -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="A/ltSMPa"; 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 S1729082AbfBYXud (ORCPT + 99 others); Mon, 25 Feb 2019 18:50:33 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37557 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728727AbfBYXuV (ORCPT ); Mon, 25 Feb 2019 18:50:21 -0500 Received: by mail-pl1-f195.google.com with SMTP id q3so5259193pll.4 for ; Mon, 25 Feb 2019 15:50:21 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=18FsJ3EIYqY47G5XG6Ckl0/smQnwz5gVJaP2swZATXU=; b=A/ltSMPaBexListhDs4/AsVheowqlezfquLkRw+kUh+uNgshPjq1FFVJ7+DoB8aHNG enC0NTqEEIr1HeG/Y/gCNumPmAeRfKmuBa+DbvRoVUm/m/F+7L4KaZv9uABTw7F4bHUl KwWDfOTo04Pr/wqptfsrTSSOR3oBwg93ZA1tg= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=18FsJ3EIYqY47G5XG6Ckl0/smQnwz5gVJaP2swZATXU=; b=meAExI8C7XP7Dv+4pCsHoRPaojql3HOlWWiboYTHmmJGC8j0xJfR0ajCrylbKKCdJR fJ35ZXznB1jd8gpIAQUz0iHr9Ma9BadoAsrIaPfZqYx679CVv9JisfPGMG1GTytW7gZm 7GEc3VOesgaPcC7DhydaYQ1EgaJXU+61ARG8cWCLB+/4URnOqULzbZ03HdKlTCfXHzTF U+X0TadfPvMWULuAS+2VN/0EsH2dyeE3PXIslum75PUVMo9fA6uPEH3Lfjo0+5ZtpziG Cs11QHHc1VjrEmZnkOTr2iirLswjdY1wiO6xj53/fzdLH2GaDOTv/EoDie1n8KpShGVM JehA== X-Gm-Message-State: AHQUAuYqvqfyi8I7iPSyr0W8jHRkXcxafNsSw3hYS8GLwljP0eUmGT1t RLn8+jCnVgl9DZBxLapl058BKtZidKI= X-Received: by 2002:a17:902:282b:: with SMTP id e40mr12213655plb.111.1551138621401; Mon, 25 Feb 2019 15:50:21 -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.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 15:50:20 -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 2/3] Bluetooth: hci_qca: Move boot delay to qca_send_power_pulse() Date: Mon, 25 Feb 2019 15:49:53 -0800 Message-Id: <20190225234954.82942-3-mka@chromium.org> X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog In-Reply-To: <20190225234954.82942-1-mka@chromium.org> References: <20190225234954.82942-1-mka@chromium.org> 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 After sending a power on pulse the driver has a delay of 100ms to allow the host controller to boot. Move the delay into qca_send_power_pulse(), since it is directly related with the power-on pulse. Signed-off-by: Matthias Kaehlcke --- drivers/bluetooth/hci_qca.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index e4128774e9686..eacc108c422d0 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -1036,6 +1036,9 @@ static int qca_send_power_pulse(struct hci_uart *hu, bool on) usleep_range(100, 200); hci_uart_set_flow_control(hu, false); + if (on) + msleep(100); + return 0; } @@ -1148,9 +1151,6 @@ static int qca_wcn3990_init(struct hci_uart *hu) if (ret) return ret; - /* Wait for 100 ms for SoC to boot */ - msleep(100); - /* Now the device is in ready state to communicate with host. * To sync host with device we need to reopen port. * Without this, we will have RTS and CTS synchronization -- 2.21.0.rc0.258.g878e2cd30e-goog