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: 8112041 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3DD43BEEE5 for ; Mon, 25 Jan 2016 16:46:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C60F420382 for ; Mon, 25 Jan 2016 16:46:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34F032037E for ; Mon, 25 Jan 2016 16:45:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933244AbcAYQpk (ORCPT ); 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Lee Jones Acked-by: Linus Walleij --- drivers/mfd/db8500-prcmu.c | 3 +++ drivers/thermal/Kconfig | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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