Message ID | 1456994677-3024-1-git-send-email-k.kozlowski@samsung.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Eduardo Valentin |
Headers | show |
Hi Krzysztof, On Thu, Mar 3, 2016 at 9:44 AM, Krzysztof Kozlowski <k.kozlowski@samsung.com> wrote: > --- a/drivers/thermal/Kconfig > +++ b/drivers/thermal/Kconfig > @@ -177,7 +177,7 @@ config THERMAL_EMULATION > > config HISI_THERMAL > tristate "Hisilicon thermal driver" > - depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST > + depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST && HAS_IOMEM I think these are easier to read and maintain if you split hard and soft dependencies, e.g. depends on HAS_IOMEM depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2016-03-03 18:01 GMT+09:00 Geert Uytterhoeven <geert@linux-m68k.org>: > > Hi Krzysztof, > > On Thu, Mar 3, 2016 at 9:44 AM, Krzysztof Kozlowski > <k.kozlowski@samsung.com> wrote: > > --- a/drivers/thermal/Kconfig > > +++ b/drivers/thermal/Kconfig > > @@ -177,7 +177,7 @@ config THERMAL_EMULATION > > > > config HISI_THERMAL > > tristate "Hisilicon thermal driver" > > - depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST > > + depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST && HAS_IOMEM > > I think these are easier to read and maintain if you split hard and soft > dependencies, e.g. > > depends on HAS_IOMEM > depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST Indeed this looks more readable but the HAS_IOMEM becomes a missing dependency only for COMPILE_TEST. Usually it is included in the architecture. None of the approaches look perfect to me... Thanks for feedback! Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Krzysztof, On Thu, Mar 3, 2016 at 12:49 PM, Krzysztof Kozlowski <k.kozlowski@samsung.com> wrote: > 2016-03-03 18:01 GMT+09:00 Geert Uytterhoeven <geert@linux-m68k.org>: >> On Thu, Mar 3, 2016 at 9:44 AM, Krzysztof Kozlowski >> <k.kozlowski@samsung.com> wrote: >> > --- a/drivers/thermal/Kconfig >> > +++ b/drivers/thermal/Kconfig >> > @@ -177,7 +177,7 @@ config THERMAL_EMULATION >> > >> > config HISI_THERMAL >> > tristate "Hisilicon thermal driver" >> > - depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST >> > + depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST && HAS_IOMEM >> >> I think these are easier to read and maintain if you split hard and soft >> dependencies, e.g. >> >> depends on HAS_IOMEM >> depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST > > Indeed this looks more readable but the HAS_IOMEM becomes a missing > dependency only for COMPILE_TEST. Usually it is included in the > architecture. HAS_IOMEM is still a dependency, but it's implied by ARCH_HISI. COMPILE_TEST allows to discover more dependencies, and document them. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-pm" 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/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 5e7c97a3f1d8..bf0247869add 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -177,7 +177,7 @@ config THERMAL_EMULATION config HISI_THERMAL tristate "Hisilicon thermal driver" - depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST + depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST && HAS_IOMEM help Enable this to plug hisilicon's thermal sensor driver into the Linux thermal framework. cpufreq is used as the cooling device to throttle @@ -196,7 +196,7 @@ config IMX_THERMAL config SPEAR_THERMAL tristate "SPEAr thermal sensor driver" - depends on PLAT_SPEAR || COMPILE_TEST + depends on PLAT_SPEAR || COMPILE_TEST && HAS_IOMEM depends on OF help Enable this to plug the SPEAr thermal sensor driver into the Linux @@ -204,7 +204,7 @@ config SPEAR_THERMAL config ROCKCHIP_THERMAL tristate "Rockchip thermal driver" - depends on ARCH_ROCKCHIP || COMPILE_TEST + depends on ARCH_ROCKCHIP || COMPILE_TEST && HAS_IOMEM depends on RESET_CONTROLLER help Rockchip thermal driver provides support for Temperature sensor @@ -214,15 +214,14 @@ config ROCKCHIP_THERMAL config RCAR_THERMAL tristate "Renesas R-Car thermal driver" - depends on ARCH_SHMOBILE || COMPILE_TEST - depends on HAS_IOMEM + depends on ARCH_SHMOBILE || COMPILE_TEST && HAS_IOMEM help Enable this to plug the R-Car thermal sensor driver into the Linux thermal framework. config KIRKWOOD_THERMAL tristate "Temperature sensor on Marvell Kirkwood SoCs" - depends on MACH_KIRKWOOD || COMPILE_TEST + depends on MACH_KIRKWOOD || COMPILE_TEST && HAS_IOMEM depends on OF help Support for the Kirkwood thermal sensor driver into the Linux thermal @@ -230,7 +229,7 @@ config KIRKWOOD_THERMAL config DOVE_THERMAL tristate "Temperature sensor on Marvell Dove SoCs" - depends on ARCH_DOVE || MACH_DOVE || COMPILE_TEST + depends on ARCH_DOVE || MACH_DOVE || COMPILE_TEST && HAS_IOMEM depends on OF help Support for the Dove thermal sensor driver in the Linux thermal @@ -248,7 +247,7 @@ config DB8500_THERMAL config ARMADA_THERMAL tristate "Armada 370/XP thermal management" - depends on ARCH_MVEBU || COMPILE_TEST + depends on ARCH_MVEBU || COMPILE_TEST && HAS_IOMEM depends on OF help Enable this option if you want to have support for thermal management @@ -367,14 +366,14 @@ config INTEL_PCH_THERMAL config MTK_THERMAL tristate "Temperature sensor driver for mediatek SoCs" - depends on ARCH_MEDIATEK || COMPILE_TEST + depends on ARCH_MEDIATEK || COMPILE_TEST && HAS_IOMEM default y help Enable this option if you want to have support for thermal management controller present in Mediatek SoCs menu "Texas Instruments thermal drivers" -depends on ARCH_HAS_BANDGAP || COMPILE_TEST +depends on ARCH_HAS_BANDGAP || COMPILE_TEST && HAS_IOMEM source "drivers/thermal/ti-soc-thermal/Kconfig" endmenu diff --git a/drivers/thermal/samsung/Kconfig b/drivers/thermal/samsung/Kconfig index e0da3865e060..222e644169f0 100644 --- a/drivers/thermal/samsung/Kconfig +++ b/drivers/thermal/samsung/Kconfig @@ -1,6 +1,7 @@ config EXYNOS_THERMAL tristate "Exynos thermal management unit driver" depends on THERMAL_OF + depends on HAS_IOMEM help If you say yes here you get support for the TMU (Thermal Management Unit) driver for SAMSUNG EXYNOS series of SoCs. This driver initialises
The devres.o gets linked if HAS_IOMEM is present so on ARCH=um allyesconfig (COMPILE_TEST) failed on many files with: drivers/built-in.o: In function `kirkwood_thermal_probe': kirkwood_thermal.c:(.text+0x390a25): undefined reference to `devm_ioremap_resource' drivers/built-in.o: In function `exynos_tmu_probe': exynos_tmu.c:(.text+0x39246b): undefined reference to `devm_ioremap' The users of devm_ioremap_resource() which are compile-testable should depend on HAS_IOMEM. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> --- Changes since v1: 1. Fix linking error also on TI. 2. Use different approach for HAS_IOMEM dependency. IT is needed only for COMPILE_TEST so use && to show that. --- drivers/thermal/Kconfig | 19 +++++++++---------- drivers/thermal/samsung/Kconfig | 1 + 2 files changed, 10 insertions(+), 10 deletions(-)