From patchwork Thu Feb 12 08:00:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 5818041 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC9739F380 for ; Thu, 12 Feb 2015 08:03:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCC6E20173 for ; Thu, 12 Feb 2015 08:03:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E917D20160 for ; Thu, 12 Feb 2015 08:03:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YLohW-0001d8-EL; Thu, 12 Feb 2015 08:00:42 +0000 Received: from smtp.csie.ntu.edu.tw ([140.112.30.61]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YLohT-0001ZO-Nd for linux-arm-kernel@lists.infradead.org; Thu, 12 Feb 2015 08:00:40 +0000 Received: from mirror2.csie.ntu.edu.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (Authenticated sender: b93043) by smtp.csie.ntu.edu.tw (Postfix) with ESMTPSA id 7E3842036B; Thu, 12 Feb 2015 16:00:13 +0800 (CST) Received: by mirror2.csie.ntu.edu.tw (Postfix, from userid 1000) id 6A8F25F950; Thu, 12 Feb 2015 16:00:13 +0800 (CST) From: Chen-Yu Tsai To: Dmitry Torokhov , Hans de Goede Subject: [PATCH v2] Input: sun4i-ts: add thermal driver dependency Date: Thu, 12 Feb 2015 16:00:11 +0800 Message-Id: <1423728011-30272-1-git-send-email-wens@csie.org> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150212_000039_905048_8FD81F20 X-CRM114-Status: GOOD ( 10.09 ) X-Spam-Score: -2.3 (--) Cc: Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-input@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Arnd Bergmann The sun4i-ts driver has had a dependency on the thermal code with the addition of the thermal zone sensor support, but this is not currently enforced in Kconfig, so with TOUCHSCREEN_SUN4I=y, THERMAL=m and THERMAL_OF=y we get drivers/built-in.o: In function `sun4i_ts_remove': :(.text+0x2376f4): undefined reference to `thermal_zone_of_sensor_unregister' drivers/built-in.o: In function `sun4i_ts_probe': :(.text+0x237a94): undefined reference to `thermal_zone_of_sensor_register' :(.text+0x237c00): undefined reference to `thermal_zone_of_sensor_unregister' We need the dependency on THERMAL in order to ensure that this driver becomes a loadable module if the thermal support itself is modular, while the dependency on THERMAL_OF is a runtime dependency and the driver will still build if it is missing. It is entirely possible to build sun4i-ts without THERMAL_OF just to use the hwmon sensors and/or touchscreen. Fixes: 223697107949 ("Input: sun4i-ts - add thermal zone sensor support") Signed-off-by: Arnd Bergmann [wens@csie.org: Fix description and Kconfig dependencies] Signed-off-by: Chen-Yu Tsai --- v2 updates the Kconfig dependencies as Dmitry pointed out, and makes the description be more specific on the failing config and why a dependency on THERMAL_OF is not required. The failing commit hash is also updated. --- drivers/input/touchscreen/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 58917525126e..6261fd6d7c3c 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -943,6 +943,7 @@ config TOUCHSCREEN_SUN4I tristate "Allwinner sun4i resistive touchscreen controller support" depends on ARCH_SUNXI || COMPILE_TEST depends on HWMON + depends on THERMAL || !THERMAL_OF help This selects support for the resistive touchscreen controller found on Allwinner sunxi SoCs.