From patchwork Tue Aug 9 01:23:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 9270049 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A1DED60754 for ; Tue, 9 Aug 2016 01:23:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89DF32837F for ; Tue, 9 Aug 2016 01:23:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DEC0283EE; Tue, 9 Aug 2016 01:23:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F24F42837F for ; Tue, 9 Aug 2016 01:23:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbcHIBXf (ORCPT ); Mon, 8 Aug 2016 21:23:35 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35279 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652AbcHIBXe (ORCPT ); Mon, 8 Aug 2016 21:23:34 -0400 Received: by mail-pa0-f45.google.com with SMTP id iw10so118711384pac.2 for ; Mon, 08 Aug 2016 18:23:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hO2vB8u2DLCcXtwntvKPAOsr8P/9XE3UqNx/LfNLbf0=; b=AXKwIM0FKU0PEXATGHcPpvtNZIpbpB1+5Kd6bq4efLYf84IRAjI3WJD2lSZRRW+cYe iJmFMLOCoAwWrGQK5PxFl96FtfsL8orzfA1h+TlboigWA4/IklmB9xYCVdk8o1z7MO8E b37O7v7DV1a+wB2djwHgiJlLGS75OLfKv8IUI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hO2vB8u2DLCcXtwntvKPAOsr8P/9XE3UqNx/LfNLbf0=; b=LOkq2W8gy/I4KM10iUBmeiVpiDR+sOyYo8UTLc06Bf3DvwpvxGz+vy3W2Ldg1vvGGx vMxNtUdUUUGvDwXSuWnmGFaaAq+zm1B0tQIsHLfZ25tTi7i4YCyEn1l4GmpUGoBiAll6 69If6U58HgjI4lPtOVzvEw8mFxzYzy+v+UacchJJveMG2bJIyCIR7dlyLdcIkdGk0f5t 8Q0kLhblMViCRKRQ9rZY8v8PC+LFafsKJ630Pd2z+IGhnjFA21G/OvTx9/xDMwfEdo4d G296vlbUR+EaX8yMiFjr6bxIfw6frNnSE9ZhR78NUNet6UQaTGrbtq8E9AbpYAPwEYFu NHhw== X-Gm-Message-State: AEkoousTt38oLL8LeCxFCT7+v5P8vblzC+k3U9MSFg/CrJ1MvmoZCTpiNJOdg6d/xjAyk5QV X-Received: by 10.66.135.40 with SMTP id pp8mr168999382pab.113.1470705812383; Mon, 08 Aug 2016 18:23:32 -0700 (PDT) Received: from leoy-linaro (61-216-91-114.HINET-IP.hinet.net. [61.216.91.114]) by smtp.gmail.com with ESMTPSA id m24sm50912268pfi.34.2016.08.08.18.23.07 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 08 Aug 2016 18:23:31 -0700 (PDT) Date: Tue, 9 Aug 2016 09:23:03 +0800 From: Leo Yan To: Daniel Thompson Cc: Amit Kucheria , Michael Turquette , Stephen Boyd , Jiancheng Xue , Philipp Zabel , Rob Herring , linux-clk@vger.kernel.org, LKML , Dietmar Eggemann , Guodong Xu Subject: Re: [PATCH] clk: Hi6220: enable stub clock driver for ARCH_HISI Message-ID: <20160809012303.GA19812@leoy-linaro> References: <1470627463-20570-1-git-send-email-leo.yan@linaro.org> <20160808064241.GA30622@leoy-linaro> <5d98a054-c057-81eb-9ee7-789353a093e5@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Aug 08, 2016 at 09:36:32PM +0100, Daniel Thompson wrote: [...] > >My earlier patch focused on enabling the stub driver in the case the > >thermal driver was enabled (and subsequently turning on HISI_THERMAL > >in defconfig). The EAS profiling usecase to prevent thermal-throttling > >from kicking in is a bad default to have in the kernel, IMO - it can > >be easily achieved by just changing the thermal thresholds. > > > >Something like the following, with HISI_THERMAL added to defconfig > >would give a "stable" kernel on Hikey. > > > >diff --git i/drivers/thermal/Kconfig w/drivers/thermal/Kconfig > >index 2d702ca..77597a5 100644 > >--- i/drivers/thermal/Kconfig > >+++ w/drivers/thermal/Kconfig > >@@ -177,8 +177,11 @@ config THERMAL_EMULATION > > > > config HISI_THERMAL > > tristate "Hisilicon thermal driver" > >- depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST > >+ depends on (ARCH_HISI && OF) || COMPILE_TEST > > depends on HAS_IOMEM > >+ select CPU_THERMAL > >+ select CPUFREQ_DT > >+ select STUB_CLK_HI6220 > > I'm actually a little uncomfortable having a thermal sensor dictate > what cooling devices are used to react to its temperature reading. > The link between sensors and cooling devices comes from DT. > > However I admit there are other platforms (IMX and DB8500) that > accept the same build time diktat from their thermal sensors. For thermal enabling on Hikey with CPU cooling device, how about below change? I checked arch/arm/configs/multi_v7_defconfig, both CONFIG_CPUFREQ_DT and CONFIG_CPU_THERMAL have been enabled in it. These two drivers are quite common and used by many ARM platforms. --- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 0555b7c..f65336f 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -78,6 +78,7 @@ CONFIG_COMPAT=y CONFIG_CPU_IDLE=y CONFIG_ARM_CPUIDLE=y CONFIG_CPU_FREQ=y +CONFIG_CPUFREQ_DT=y CONFIG_ARM_BIG_LITTLE_CPUFREQ=y CONFIG_ARM_SCPI_CPUFREQ=y CONFIG_NET=y @@ -217,6 +218,7 @@ CONFIG_SENSORS_INA2XX=m CONFIG_SENSORS_ARM_SCPI=y CONFIG_THERMAL=y CONFIG_THERMAL_EMULATION=y +CONFIG_CPU_THERMAL=y CONFIG_EXYNOS_THERMAL=y CONFIG_WATCHDOG=y CONFIG_RENESAS_WDT=y diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 2d702ca..91ebab3 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -177,8 +177,10 @@ config THERMAL_EMULATION config HISI_THERMAL tristate "Hisilicon thermal driver" - depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST + depends on ARCH_HISI || COMPILE_TEST depends on HAS_IOMEM + depends on OF + default y help Enable this to plug hisilicon's thermal sensor driver into the Linux thermal framework. cpufreq is used as the cooling device to throttle