All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] thermal: TI: remove TI_THERMAL dependency on CPU_THERMAL
@ 2013-10-04 12:39 Bartlomiej Zolnierkiewicz
  2013-10-04 16:38   ` Eduardo Valentin
  0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2013-10-04 12:39 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: Zhang Rui, linux-pm, linux-kernel, Kyungmin Park

Cover cpufreq_get_current_driver() call in ti-thermal-common.c with
CPU_FREQ ifdefs and remove no longer needed CPU_THERMAL dependency
from TI_THERMAL config option (stubs for other cpufreq functions for
CPU_THERMAL=n case are already available).

Please note that this enables TI_THERMAL config option in the final
config derived from omap2plus_defconfig (which enables CPU_THERMAL
config option but without CPU_FREQ one so TI_THERMAL config option
was not enabled previously in the final config).

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/thermal/ti-soc-thermal/Kconfig             | 1 -
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/ti-soc-thermal/Kconfig b/drivers/thermal/ti-soc-thermal/Kconfig
index bd4c7be..bf5d6e4 100644
--- a/drivers/thermal/ti-soc-thermal/Kconfig
+++ b/drivers/thermal/ti-soc-thermal/Kconfig
@@ -13,7 +13,6 @@ config TI_SOC_THERMAL
 config TI_THERMAL
 	bool "Texas Instruments SoCs thermal framework support"
 	depends on TI_SOC_THERMAL
-	depends on CPU_THERMAL
 	help
 	  If you say yes here you want to get support for generic thermal
 	  framework for the Texas Instruments on die bandgap temperature sensor.
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 4f8b9af..94d91af 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -357,10 +357,12 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
 	if (!data)
 		return -EINVAL;
 
+#ifdef CONFIG_CPU_FREQ
 	if (!cpufreq_get_current_driver()) {
 		dev_dbg(bgp->dev, "no cpufreq driver yet\n");
 		return -EPROBE_DEFER;
 	}
+#endif
 
 	/* Register cooling device */
 	data->cool_dev = cpufreq_cooling_register(cpu_present_mask);
-- 
1.8.2.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] thermal: TI: remove TI_THERMAL dependency on CPU_THERMAL
  2013-10-04 12:39 [PATCH 1/2] thermal: TI: remove TI_THERMAL dependency on CPU_THERMAL Bartlomiej Zolnierkiewicz
@ 2013-10-04 16:38   ` Eduardo Valentin
  0 siblings, 0 replies; 3+ messages in thread
From: Eduardo Valentin @ 2013-10-04 16:38 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel, Kyungmin Park

[-- Attachment #1: Type: text/plain, Size: 2576 bytes --]

On 04-10-2013 08:39, Bartlomiej Zolnierkiewicz wrote:
> Cover cpufreq_get_current_driver() call in ti-thermal-common.c with
> CPU_FREQ ifdefs and remove no longer needed CPU_THERMAL dependency
> from TI_THERMAL config option (stubs for other cpufreq functions for
> CPU_THERMAL=n case are already available).
> 
> Please note that this enables TI_THERMAL config option in the final
> config derived from omap2plus_defconfig (which enables CPU_THERMAL
> config option but without CPU_FREQ one so TI_THERMAL config option
> was not enabled previously in the final config).
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/thermal/ti-soc-thermal/Kconfig             | 1 -
>  drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 ++
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/ti-soc-thermal/Kconfig b/drivers/thermal/ti-soc-thermal/Kconfig
> index bd4c7be..bf5d6e4 100644
> --- a/drivers/thermal/ti-soc-thermal/Kconfig
> +++ b/drivers/thermal/ti-soc-thermal/Kconfig
> @@ -13,7 +13,6 @@ config TI_SOC_THERMAL
>  config TI_THERMAL
>  	bool "Texas Instruments SoCs thermal framework support"
>  	depends on TI_SOC_THERMAL
> -	depends on CPU_THERMAL

Until the code that uses cpu thermal is still present in the driver, I
would prefer to have this dependency, for runtime proper behavior. The
driver design is still to take the responsibility to load the cpufreq
cooling device. Up to now they are still dependent.

>  	help
>  	  If you say yes here you want to get support for generic thermal
>  	  framework for the Texas Instruments on die bandgap temperature sensor.
> diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> index 4f8b9af..94d91af 100644
> --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> @@ -357,10 +357,12 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
>  	if (!data)
>  		return -EINVAL;
>  
> +#ifdef CONFIG_CPU_FREQ
>  	if (!cpufreq_get_current_driver()) {
>  		dev_dbg(bgp->dev, "no cpufreq driver yet\n");
>  		return -EPROBE_DEFER;
>  	}
> +#endif

I would prefer not to have this ifdef here.

>  
>  	/* Register cooling device */
>  	data->cool_dev = cpufreq_cooling_register(cpu_present_mask);
> 


-- 
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] thermal: TI: remove TI_THERMAL dependency on CPU_THERMAL
@ 2013-10-04 16:38   ` Eduardo Valentin
  0 siblings, 0 replies; 3+ messages in thread
From: Eduardo Valentin @ 2013-10-04 16:38 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel, Kyungmin Park

[-- Attachment #1: Type: text/plain, Size: 2576 bytes --]

On 04-10-2013 08:39, Bartlomiej Zolnierkiewicz wrote:
> Cover cpufreq_get_current_driver() call in ti-thermal-common.c with
> CPU_FREQ ifdefs and remove no longer needed CPU_THERMAL dependency
> from TI_THERMAL config option (stubs for other cpufreq functions for
> CPU_THERMAL=n case are already available).
> 
> Please note that this enables TI_THERMAL config option in the final
> config derived from omap2plus_defconfig (which enables CPU_THERMAL
> config option but without CPU_FREQ one so TI_THERMAL config option
> was not enabled previously in the final config).
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/thermal/ti-soc-thermal/Kconfig             | 1 -
>  drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 ++
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/ti-soc-thermal/Kconfig b/drivers/thermal/ti-soc-thermal/Kconfig
> index bd4c7be..bf5d6e4 100644
> --- a/drivers/thermal/ti-soc-thermal/Kconfig
> +++ b/drivers/thermal/ti-soc-thermal/Kconfig
> @@ -13,7 +13,6 @@ config TI_SOC_THERMAL
>  config TI_THERMAL
>  	bool "Texas Instruments SoCs thermal framework support"
>  	depends on TI_SOC_THERMAL
> -	depends on CPU_THERMAL

Until the code that uses cpu thermal is still present in the driver, I
would prefer to have this dependency, for runtime proper behavior. The
driver design is still to take the responsibility to load the cpufreq
cooling device. Up to now they are still dependent.

>  	help
>  	  If you say yes here you want to get support for generic thermal
>  	  framework for the Texas Instruments on die bandgap temperature sensor.
> diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> index 4f8b9af..94d91af 100644
> --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> @@ -357,10 +357,12 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
>  	if (!data)
>  		return -EINVAL;
>  
> +#ifdef CONFIG_CPU_FREQ
>  	if (!cpufreq_get_current_driver()) {
>  		dev_dbg(bgp->dev, "no cpufreq driver yet\n");
>  		return -EPROBE_DEFER;
>  	}
> +#endif

I would prefer not to have this ifdef here.

>  
>  	/* Register cooling device */
>  	data->cool_dev = cpufreq_cooling_register(cpu_present_mask);
> 


-- 
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-04 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-04 12:39 [PATCH 1/2] thermal: TI: remove TI_THERMAL dependency on CPU_THERMAL Bartlomiej Zolnierkiewicz
2013-10-04 16:38 ` Eduardo Valentin
2013-10-04 16:38   ` Eduardo Valentin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.