From patchwork Mon Apr 10 13:18:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 97144 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1359240qgd; Mon, 10 Apr 2017 06:20:16 -0700 (PDT) X-Received: by 10.84.217.148 with SMTP id p20mr27843586pli.164.1491830416565; Mon, 10 Apr 2017 06:20:16 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si13592358pgi.179.2017.04.10.06.20.16; Mon, 10 Apr 2017 06:20:16 -0700 (PDT) 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=@ti.com; 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=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754037AbdDJNTx (ORCPT + 24 others); Mon, 10 Apr 2017 09:19:53 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:55329 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753211AbdDJNTu (ORCPT ); Mon, 10 Apr 2017 09:19:50 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v3ADJJTD020120; Mon, 10 Apr 2017 08:19:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1491830359; bh=ZaVM5q7SO8Rs97Rf+JJxfhyIkuYFy4mOGuwJAkGVWuM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MpnzlZrnZre7QDrJKvZlTQsylsIhNSk+p/re/hPFXLmMFOBzg5aM/eLde8HCKEr2i Bh8PLwsw0ZmlteebCQcWQTYgkzq79EwwgceBO7r9ZNmD+wFOFws9fc0piGZI8fxb0Q mkWBkQPeGon3JsvmhCAnldsklP6QINKvFqqpneYo= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v3ADJEcl020945; Mon, 10 Apr 2017 08:19:14 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Mon, 10 Apr 2017 08:19:14 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v3ADIOMQ032573; Mon, 10 Apr 2017 08:19:13 -0500 From: Kishon Vijay Abraham I To: CC: , Subject: [PATCH 32/32] phy: qcom-qusb2: add NVMEM dependency Date: Mon, 10 Apr 2017 18:48:23 +0530 Message-ID: <20170410131823.26485-33-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170410131823.26485-1-kishon@ti.com> References: <20170410131823.26485-1-kishon@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tobias Regnery With CONFIG_NVMEM=m and CONFIG_PHY_QCOM_QUSB2=y we get a link error from calls to devm_nvmem_cell_get and nvmem_cell_read: drivers/built-in.o: In function `qusb2_phy_probe': binder.c:(.text+0x4750): undefined reference to `devm_nvmem_cell_get' drivers/built-in.o: In function `qusb2_phy_init': binder.c:(.text+0x489c): undefined reference to `nvmem_cell_read' Fix this by adding a Kconfig dependency to ensure we can only have this driver built in when the nvmem functions are also built in or we see the empty stub functions. We can still build this driver as a module when the nvmem core is build as module, too. Fixes: deffad633413 ("phy: qcom-qusb2: New driver for QUSB2 PHY on Qcom chips") Signed-off-by: Tobias Regnery Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 3d6369af9225..afaf7b643eeb 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -450,6 +450,7 @@ config PHY_QCOM_QMP config PHY_QCOM_QUSB2 tristate "Qualcomm QUSB2 PHY Driver" depends on OF && (ARCH_QCOM || COMPILE_TEST) + depends on NVMEM || !NVMEM select GENERIC_PHY help Enable this to support the HighSpeed QUSB2 PHY transceiver for USB