Message ID | 20181115093603.26729-6-wens@csie.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 2560814E2 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 15 Nov 2018 09:38:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1392C2C046 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 15 Nov 2018 09:38:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06CBA2C17B; Thu, 15 Nov 2018 09:38:22 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 D0FA32C046 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 15 Nov 2018 09:38:20 +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:References:In-Reply-To: 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: List-Owner; bh=om4TMs4qkz7hx/XQkCaO/pfQwZlVkxBL3itFb3LdZrA=; b=lgOuMjJ2UF7dZU yRum5x7QbZyoEdkdILbtZGIxi8+5KHJGaetLmnjIItNt6gG3GRJ2gfshxW+29yKpD8qrkcBNhH8ZB o69KLo56Y9D/GKot/gz4z2B2hAw8Y/zDfHAj39PmKShkbwQXuo4ajOq4t9c4akSfN1Il/hy//wDCO pt3m0nVfJqGCq5B5frbuBLJjnPqtQzGl8KSmBRfO53vF5FZbIJhmZtihM4g3JJRuKWH8VTKj7ZsCJ Qgh/L9t7XEHxxk4r/Il3DUEL9oY1Jw8n8dbwrYumpYC1ccHZO41MN2SIjeB2i0wpXMOCs6qOo7eFd +j05Z1aGTLk0leiyNakg==; 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 1gNE6J-0002vS-Tj; Thu, 15 Nov 2018 09:38:15 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNE4o-0001Sb-Ak for linux-arm-kernel@bombadil.infradead.org; Thu, 15 Nov 2018 09:36:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YSopQEUqIGlU3xA8CXwyqhvN+E+HbQ/yVEZqjf4o5Ok=; b=WUGrp1W0FOCSKDJhdPwdsRI4cJ JiaQ/D6iSoTkuq6zGNtoroA/zn04bzKHEUYWyf6gnzppwfxHiqCdVDLTvj155MVZnNu1wKs8Af1lM CCzAX8CMmPYloCCqWrFacETaFgnwQh0XjqNnd1eKpuevS3PZRY1eEy3x7715dyGP8EAa62g33hrXM tuscIi0gZggw03G4/zVExUi4LKooTjr3+QdufCHjlqBwS36WSkhPiQwApv+8bIUGCb+RWmWJ7ow7A OEShnyWMI6/DnDRYihYT966WN2mvFNeGKXDMU3AXKl8cZJqJ99J23CHNQWWUCtF95Rsj21hiAFoyJ /DKTbSHw==; Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNE4l-00053V-Cr for linux-arm-kernel@lists.infradead.org; Thu, 15 Nov 2018 09:36:41 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id BEE595FCA9; Thu, 15 Nov 2018 17:36:04 +0800 (CST) From: Chen-Yu Tsai <wens@csie.org> To: Marcel Holtmann <marcel@holtmann.org>, Johan Hedberg <johan.hedberg@gmail.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Maxime Ripard <maxime.ripard@bootlin.com> Subject: [PATCH v2 05/15] Bluetooth: hci_bcm: Handle deferred probing for the clock supply Date: Thu, 15 Nov 2018 17:35:53 +0800 Message-Id: <20181115093603.26729-6-wens@csie.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181115093603.26729-1-wens@csie.org> References: <20181115093603.26729-1-wens@csie.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181115_093639_711998_6DFB7F9F X-CRM114-Status: GOOD ( 13.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>, Loic Poulain <loic.poulain@gmail.com>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
ARM: sunxi: Enable Broadcom-based Bluetooth controllers
|
expand
|
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index ddbd8c6a0ceb..800132369134 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -907,6 +907,10 @@ static int bcm_get_resources(struct bcm_device *dev) dev->clk = devm_clk_get(dev->dev, NULL); + /* Handle deferred probing */ + if (dev->clk == ERR_PTR(-EPROBE_DEFER)) + return PTR_ERR(dev->clk); + dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup", GPIOD_OUT_LOW); if (IS_ERR(dev->device_wakeup))
On some systems that actually have the bluetooth controller wired up with an extra clock signal, it's possible the bluetooth controller probes before the clock provider. clk_get would return a defer probe error, which was not handled by this driver. Handle this properly, so that these systems can work reliably. Signed-off-by: Chen-Yu Tsai <wens@csie.org> --- drivers/bluetooth/hci_bcm.c | 4 ++++ 1 file changed, 4 insertions(+)