From patchwork Thu Oct 25 14:16:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 149537 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1400933ljp; Thu, 25 Oct 2018 07:19:06 -0700 (PDT) X-Google-Smtp-Source: AJdET5dFh13Y/Quvm6lG/YOCdSXEz+vG1ORoLOZ7aCuQtHRKe+NNMtkYP6L0owjr1VO/KCgCAwX1 X-Received: by 2002:a62:9951:: with SMTP id d78-v6mr1714509pfe.239.1540477145897; Thu, 25 Oct 2018 07:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540477145; cv=none; d=google.com; s=arc-20160816; b=Glzx5W3Fp51DoSX9gBZG2DqTdbhcjr0kwoGtzdvaGyMb1XcX8KJXm3ZXuHVOsoCJs3 QV2Y1GoEr+jwnbXaxgYMus2vr5xpnbMApSA8fwzZ3kIiQ7F7N7bDvsXVHGF9WVgIX+m1 0QC7+W4blhTu+D9StOxya88SYkYOKOtnxprCS/8XR3/6OtNUB5blL3w2TX+JmpmCxDGl LNYcSchiFoQxa0BHzubqm7x7HOkm8LuaPpU+L9YA/u2Ao5u8s93KxjIONrUIU6QMvold 3HZnk6F4m58sZnsVZNip3J14vI4ousHwzRuMsTVNsoBBm7eLvUbehD2TAA3IptyDiKM9 6fUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=/bjq2IEIrS2WQRNy6+vaCJuwmDUlqeW3SH+4chi54X8=; b=tdwT8MpKYWzRQuYkM0Y74kl36QfhB+064rzGXpr5IXv28kFvQ4RmDhRoVkJLm31wIn OJxJfERNabdpbBqd5BtmRxCxid2140kEgxvZCkaWCEzxTTWWUkVZejaa88sWris7AYF9 uoRZZ0oSb1a1eSLnz3zbCtIWX0c6BsI18Rr5Z653mvZNCEAhXUUUlWUd7G6G8xM6uG1w Zm6dkAjs7+Cy3T8VAxM51AcTN5KHRv45AhT5SRplBrJdEFNYCXZNXTz+DO9VnVxoM+Pl oyY5uAdtEZ8uBpt8Umw4iMWvKyGym5rtREVlPzPuJu2M3zt2hmA7wtPHcqNGVAQjoIbl TWAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sceThem4; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d38-v6si8661143pgb.30.2018.10.25.07.18.59; Thu, 25 Oct 2018 07:19:05 -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=@kernel.org header.s=default header.b=sceThem4; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729716AbeJYWuf (ORCPT + 32 others); Thu, 25 Oct 2018 18:50:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:60060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729694AbeJYWud (ORCPT ); Thu, 25 Oct 2018 18:50:33 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02BEC20848; Thu, 25 Oct 2018 14:17:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540477057; bh=YOaOrhJP1gTYEC+sWTuYO7WSENJVCfHUT4Zye/75TP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sceThem4QS1G/aGcyPrJ5kAeacCJ1wQjiu6FPZy/LCs0qSztnqWx6imo0NlTXKPSq J2hsnDXo/3afLrYZCPpoAfuLzcVYBz+d/V74B/f+USFWa3vnRBwnbXzFI7TMe/OBK0 aw64bMgnMDXAwPWajpKIEytdiWntSzJkJxVlRua0= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Eduardo Valentin , Sasha Levin Subject: [PATCH AUTOSEL 4.4 17/65] thermal: allow u8500-thermal driver to be a module Date: Thu, 25 Oct 2018 10:16:17 -0400 Message-Id: <20181025141705.213937-17-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141705.213937-1-sashal@kernel.org> References: <20181025141705.213937-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 26716ce124fce88f288f07738ef685d5dfe5c13f ] 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 Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin --- drivers/mfd/db8500-prcmu.c | 3 +++ drivers/thermal/Kconfig | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index e6e4bacb09ee..12099b09a9a7 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -2048,6 +2048,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) { @@ -2074,11 +2075,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 b556fa8250fc..1def65d2f0b5 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