From patchwork Fri Dec 9 10:22:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 87409 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp230159qgi; Fri, 9 Dec 2016 02:23:47 -0800 (PST) X-Received: by 10.99.120.13 with SMTP id t13mr137868727pgc.17.1481279027706; Fri, 09 Dec 2016 02:23:47 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si28601400pgs.262.2016.12.09.02.23.47; Fri, 09 Dec 2016 02:23:47 -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 S933018AbcLIKXX (ORCPT + 25 others); Fri, 9 Dec 2016 05:23:23 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:36932 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932468AbcLIKXU (ORCPT ); Fri, 9 Dec 2016 05:23:20 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 5B29420CC2; Fri, 9 Dec 2016 11:23:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from qschulz.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 0BCE920C2E; Fri, 9 Dec 2016 11:23:08 +0100 (CET) From: Quentin Schulz To: linux@armlinux.org.uk, maxime.ripard@free-electrons.com, wens@csie.org, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, lee.jones@linaro.org Cc: Quentin Schulz , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, antoine.tenart@free-electrons.com, thomas.petazzoni@free-electrons.com Subject: [PATCH v8 1/3] ARM: sunxi_defconfig: Add CONFIG_THERMAL_OF Date: Fri, 9 Dec 2016 11:22:34 +0100 Message-Id: <20161209102236.17655-2-quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161209102236.17655-1-quentin.schulz@free-electrons.com> References: <20161209102236.17655-1-quentin.schulz@free-electrons.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This enables CONFIG_THERMAL_OF by default for sunxi_defconfig. It is required to get Allwinner SoCs' temperature from the GPADC driver. The Allwinner SoCs all have an ADC that can also act as a touchscreen controller and a thermal sensor. The first four channels can be used either for the ADC or the touchscreen and the fifth channel is used for the thermal sensor. The thermal sensor requires the IP to be in touchscreen mode to return correct values. Therefore, if the user is continuously reading the ADC channel(s), the thermal framework in which the thermal sensor is registered will switch the IP in touchscreen mode to get a temperature value and requires a delay of 100ms (because of the mode switching), then the ADC will switch back to ADC mode and requires also a delay of 100ms. If the ADC readings are critical to user and the SoC temperature is not, the GPADC driver is capable of not registering the thermal sensor in the thermal framework and thus, "quicken" the ADC readings. In most use cases, the SoC temperature is more critical (for cpu throttling for example or activating cooling devices) than ADC readings, thus it is now enabled by default. Signed-off-by: Quentin Schulz --- v8: - more explanatory commit log, added in v7 arch/arm/configs/sunxi_defconfig | 1 + 1 file changed, 1 insertion(+) -- 2.9.3 diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index 714da33..8aaeae3 100644 --- a/arch/arm/configs/sunxi_defconfig +++ b/arch/arm/configs/sunxi_defconfig @@ -83,6 +83,7 @@ CONFIG_GPIO_SYSFS=y CONFIG_POWER_SUPPLY=y CONFIG_AXP20X_POWER=y CONFIG_THERMAL=y +CONFIG_THERMAL_OF=y CONFIG_CPU_THERMAL=y CONFIG_WATCHDOG=y CONFIG_SUNXI_WATCHDOG=y