From patchwork Mon Jan 25 16:44:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101101 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1466773lbb; Mon, 25 Jan 2016 08:45:42 -0800 (PST) X-Received: by 10.98.74.135 with SMTP id c7mr26976060pfj.129.1453740342294; Mon, 25 Jan 2016 08:45:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yt3si34598846pab.60.2016.01.25.08.45.41; Mon, 25 Jan 2016 08:45:42 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933428AbcAYQpk (ORCPT + 30 others); Mon, 25 Jan 2016 11:45:40 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:64652 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265AbcAYQpf (ORCPT ); Mon, 25 Jan 2016 11:45:35 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MJawd-1aPgCR2xoJ-0031lS; Mon, 25 Jan 2016 17:44:56 +0100 From: Arnd Bergmann To: Zhang Rui , Eduardo Valentin Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, spear-devel@list.st.com, Arnd Bergmann , Linus Walleij , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] thermal: allow u8500-thermal driver to be a module Date: Mon, 25 Jan 2016 17:44:12 +0100 Message-Id: <1453740264-1972562-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453740264-1972562-1-git-send-email-arnd@arndb.de> References: <1453740264-1972562-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:mTYUYNt8u7MeFw8oUkkRyfXipcfJR53qC97j2toD50QRnFI4r2W pDJRRERvz9458EtqVcvVX5UJNwhkQi0ZbjTwITJ5+1b3H/nezlldYJy9yrjy8WmQhUQpIz4 s6lrN9TSiuaGBDQVghwjOztd96as6LlE8fQ51t3Z3ZpDk6u743r4CVxH2n8C1qEA57+PG+V rcWoNLRY/R8l/11MSHj8Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:YtWnE1+t1+o=:SKJNliq6u96QevLM2B5oj1 0SV67JWuGIsnun8ZvLIOSXxtSZPVZ3GQXWAXbLnt8/bWE3Zx2+KkQ9vSXH3NXETcrkZoX6BOf gVkPz1w3tSXEM7Vee10ty1utlHu+ENWEV7wsh10kPeFtjFGaaXXjTqQdViZMm82lqtIIHcd8J Nx76/qBWfH2GoQ4GE+RmBBcby7ZO6L/lUjm/zIOUMb5jmYllgt1RbXdyEACgkMfhm9MuwU30d UVUZGbNF1KKDXaavLEgWBLkOtAucOwV53joYdnBUe+rBuKN+HldScwcwUpKeYaq5Jnzkmsx+k i6GPR/OEjHcdyMf+0iDaxE64OyYbin0uQEm/U7YTAzv4hScKU9ci7lN/lLOBs8109qclOzcEf Tz0WE4SR4v8/K46cA6kYPw6OkbqrcYFMx+J4IpZxIeJqurieUno9bCs4qdXREvwI/PWNWgWBQ c0FdvdQ8srfCb82sIC2L6BMkBQpIDnGTj289ODJYRnnvPTUlrFlHqs7lxGqYPjWV6Tx8CJPwj fKou1fLckJ2oAeW6So5ATTI/L7tcWkcRo6zxMTGepr5R7J6YXaq1YBAr7xIU9KN+C14WVuRGm ek/6K7H4XuOynBca515i71ggSt8ReqOfeAdhYUOSNn6GsGSbLpyzrUEcq1EV96NhVzhswGTYc 8u2wagZhz4Fk2LOL4+TY4q47Al/UccZTwRvqSPFtwxk3qXhnx7vm2pJC4MuznwL5ff6M= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the thermal subsystem is a loadable module, the u8500 driver fails to build: drivers/thermal/built-in.o: In function `db8500_thermal_probe': db8500_thermal.c:(.text+0x96c): undefined reference to `thermal_zone_device_register' drivers/thermal/built-in.o: In function `db8500_thermal_work': db8500_thermal.c:(.text+0xab4): undefined reference to `thermal_zone_device_update' This changes the symbol to a tristate, so Kconfig can track the dependency correctly. Signed-off-by: Arnd Bergmann --- drivers/mfd/db8500-prcmu.c | 3 +++ drivers/thermal/Kconfig | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) -- 2.7.0 Acked-by: Lee Jones Acked-by: Linus Walleij diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 2f4a1279b094..c0a86aeb1733 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -2045,6 +2045,7 @@ int db8500_prcmu_config_hotmon(u8 low, u8 high) return 0; } +EXPORT_SYMBOL_GPL(db8500_prcmu_config_hotmon); static int config_hot_period(u16 val) { @@ -2071,11 +2072,13 @@ int db8500_prcmu_start_temp_sense(u16 cycles32k) return config_hot_period(cycles32k); } +EXPORT_SYMBOL_GPL(db8500_prcmu_start_temp_sense); int db8500_prcmu_stop_temp_sense(void) { return config_hot_period(0xFFFF); } +EXPORT_SYMBOL_GPL(db8500_prcmu_stop_temp_sense); static int prcmu_a9wdog(u8 cmd, u8 d0, u8 d1, u8 d2, u8 d3) { diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 0852fd028dc9..7c92c09be213 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -237,8 +237,8 @@ config DOVE_THERMAL framework. config DB8500_THERMAL - bool "DB8500 thermal management" - depends on ARCH_U8500 + tristate "DB8500 thermal management" + depends on MFD_DB8500_PRCMU default y help Adds DB8500 thermal management implementation according to the thermal