mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Anson Huang <anson.huang@nxp.com>,
	"rui.zhang@intel.com" <rui.zhang@intel.com>,
	"edubezval@gmail.com" <edubezval@gmail.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH] thermal: imx: fix for dependency on cpu-freq
Date: Tue, 20 Nov 2018 09:44:32 +0100	[thread overview]
Message-ID: <28d501b1-8016-cc1a-3f7c-ac485ab81aa2@linaro.org> (raw)
In-Reply-To: <1540362909-32481-1-git-send-email-Anson.Huang@nxp.com>

On 24/10/2018 08:39, Anson Huang wrote:
> The thermal driver is a standalone driver for monitoring SoC temperature
> by enabling thermal sensor, so it can be enabled even when CONFIG_CPU_FREQ
> is NOT set. So remove the dependency with CPU_THERMAL.
> 
> Add CONFIG_CPU_FREQ check for cpu-freq related operation in thermal
> driver to make thermal driver probe successfully when CONFIG_CPU_FREQ
> is NOT set.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---

Why not simply kill this legacy code ?



>  drivers/thermal/Kconfig       | 2 +-
>  drivers/thermal/imx_thermal.c | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> index 1775d44..c8a6352 100644
> --- a/drivers/thermal/Kconfig
> +++ b/drivers/thermal/Kconfig
> @@ -212,7 +212,7 @@ config HISI_THERMAL
>  
>  config IMX_THERMAL
>  	tristate "Temperature sensor driver for Freescale i.MX SoCs"
> -	depends on (ARCH_MXC && CPU_THERMAL) || COMPILE_TEST
> +	depends on ARCH_MXC || COMPILE_TEST
>  	depends on NVMEM || !NVMEM
>  	depends on MFD_SYSCON
>  	depends on OF
> diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
> index 1566154..87386d1 100644
> --- a/drivers/thermal/imx_thermal.c
> +++ b/drivers/thermal/imx_thermal.c
> @@ -648,6 +648,7 @@ static const struct of_device_id of_imx_thermal_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, of_imx_thermal_match);
>  
> +#ifdef CONFIG_CPU_FREQ
>  /*
>   * Create cooling device in case no #cooling-cells property is available in
>   * CPU node
> @@ -668,6 +669,7 @@ static int imx_thermal_register_legacy_cooling(struct imx_thermal_data *data)
>  
>  	return 0;
>  }
> +#endif
>  
>  static int imx_thermal_probe(struct platform_device *pdev)
>  {
> @@ -743,6 +745,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
>  	regmap_write(map, data->socdata->sensor_ctrl + REG_SET,
>  		     data->socdata->power_down_mask);
>  
> +#ifdef CONFIG_CPU_FREQ
>  	data->policy = cpufreq_cpu_get(0);
>  	if (!data->policy) {
>  		pr_debug("%s: CPUFreq policy not found\n", __func__);
> @@ -755,6 +758,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
>  			"failed to register cpufreq cooling device: %d\n", ret);
>  		return ret;
>  	}
> +#endif
>  
>  	data->thermal_clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(data->thermal_clk)) {
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  parent reply	other threads:[~2018-11-20  8:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24  6:39 Anson Huang
2018-11-20  7:04 ` Anson Huang
2018-11-20  8:44 ` Daniel Lezcano [this message]
2018-11-20  8:47   ` Anson Huang
2018-11-20  8:54     ` Daniel Lezcano
2018-11-20  8:58       ` Anson Huang
2018-11-20  9:29         ` Daniel Lezcano
2018-11-20 10:12           ` Lucas Stach
2018-11-20 10:48 ` Viresh Kumar
2018-11-21  1:58   ` Anson Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28d501b1-8016-cc1a-3f7c-ac485ab81aa2@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=anson.huang@nxp.com \
    --cc=edubezval@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®