Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp971536yba; Wed, 24 Apr 2019 12:42:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxztG3VIsKeI7rgQT7YOIZ+xC9R2EOHOi7ZUV+jhqnSwCzO5S9ItsKt6CIyPGI0AMsltF2S X-Received: by 2002:a17:902:2ae6:: with SMTP id j93mr35238175plb.18.1556134931868; Wed, 24 Apr 2019 12:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556134931; cv=none; d=google.com; s=arc-20160816; b=lOzosUYUh4kejFvUs5yCgT+DX4gziVSbER8a3iYQx0012s1jnCO8VLXCKIjXybqEhV nsrZyEFf11all0K24xNMlWh0/ax0ftaL3AtZVXFg/3FTY+hdWO6Y7X9yxZSC1taH4Zte ukrur0cS51dRSNyGIJZlrLYggdEv/5qlXDk7dDjd03Ypyz14WcOSk2H0mOz/MgqxI9ua REUaH7GycjZjUmUUtZAI4JzorVnDPO5X2nCMcPChTzXw1OL8UNZqdoj1unFFaTHYxKCa nSSEHyVSqq+3NZDb8iqm5kN2hD3JqZUI70nWY1amshu5wpEmBhoY7SQEjcaPdhwG67F0 tfWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=z5OU6POwHr23l779oFdjZiOjNqSXej1igFXBpTEZuhw=; b=u8UZVpSgapCWtuRwtZKIlNiGcRjZF6vL2zvAhoZ+iL8D41ZLTjc2CYNM6Av44Hj6Zb lSK6IxEqk9wCLD1eAcPo8urqXWc5GP1IXO/UArgQvgrkg4vKu7DuWyNCUFL/l6C6bHM5 OiYJ6Etza2QMA9EulGzcJDmbuxH9rfAug2fHWvM4a44/Axf2hcuj+HcSPLmCOVHpp01n bJYuTpWYa9Y3TG/hJKut+Jhz2Y30D8LNashXC46jDf9kqW9zzY6mawghXv05Bm2hOQfm AWxwgimXFTkIa/cf23xaaTmZZ5+anbK3o2Y5JwIPQWT4gm2CbzbG8hriuEsrby1mWh5u fRSw== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f127si20143681pfc.176.2019.04.24.12.41.57; Wed, 24 Apr 2019 12:42:11 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730363AbfDXNCP (ORCPT + 99 others); Wed, 24 Apr 2019 09:02:15 -0400 Received: from mga11.intel.com ([192.55.52.93]:41910 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726322AbfDXNCO (ORCPT ); Wed, 24 Apr 2019 09:02:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2019 06:02:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,389,1549958400"; d="scan'208";a="136979691" Received: from nzhao1-mobl.ccr.corp.intel.com ([10.249.168.79]) by orsmga008.jf.intel.com with ESMTP; 24 Apr 2019 06:02:07 -0700 Message-ID: <1556110926.2390.13.camel@intel.com> Subject: Re: [PATCH 1/7] thermal/drivers/core: Remove the module Kconfig's option From: Zhang Rui To: Eduardo Valentin , Daniel Lezcano Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Krzysztof Kozlowski , Russell King , Ralf Baechle , Paul Burton , James Hogan , Guan Xuetao , Andrew Morton , Alexey Brodkin , Robert Jarzmik , Arnd Bergmann , Enric Balletbo i Serra , Daniel Mack , "moderated list:ARM PORT" , "open list:MIPS" Date: Wed, 24 Apr 2019 21:02:06 +0800 In-Reply-To: <20190423155208.GC16014@localhost.localdomain> References: <20190402161256.11044-1-daniel.lezcano@linaro.org> <20190423155208.GC16014@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 二, 2019-04-23 at 08:52 -0700, Eduardo Valentin wrote: > Hello, > > On Tue, Apr 02, 2019 at 06:12:44PM +0200, Daniel Lezcano wrote: > > > > The module support for the thermal subsystem makes little sense: > >  - some subsystems relying on it are not modules, thus forcing the > >    framework to be compiled in > >  - it is compiled in for almost every configs, the remaining ones > >    are a few platforms where I don't see why we can not switch the > > thermal > >    to 'y'. The drivers can stay in tristate. > >  - platforms need the thermal to be ready as soon as possible at > > boot time > >    in order to mitigate > > > > Usually the subsystems framework are compiled-in and the plugs are > > as module. > > > > Remove the module option. The removal of the module related dead > > code will > > come after this patch gets in or is acked. > > I remember some buzilla entry around this some time back. > > Rui, do you remember why you made this to be module? > > I dont have strong opinion here, but I would like to see > a better description why we are going this direction rather > than "most people dont use it as module". Was there any particular > specific technical motivation? > I checked the change log, it seems that we make CONFIG_THERMAL from bool to tristate long time ago. commit 63c4ec905d63834a97ec7dbbf0a2ec89ef5872be Author:     Zhang Rui AuthorDate: Mon Apr 21 16:07:13 2008 +0800 Commit:     Len Brown CommitDate: Tue Apr 29 02:44:00 2008 -0400     thermal: add the support for building the generic thermal as a module          Build the generic thermal driver as module "thermal_sys".          Make ACPI thermal, video, processor and fan SELECT the generic     thermal driver, as these drivers rely on it to build the sysfs I/F.          Signed-off-by: Zhang Rui     Acked-by: Jean Delvare     Signed-off-by: Len Brown But the things described in the changelog does not seem to be a solid reason why we need thermal to be a module. Anyway, let's try bool instead of tristate and see if everything still works well. thanks, rui > > > > > > > Signed-off-by: Daniel Lezcano > > Acked-by: Guenter Roeck > > For mini2440: > > Acked-by: Krzysztof Kozlowski > > --- > >  arch/arm/configs/mini2440_defconfig        | 2 +- > >  arch/arm/configs/pxa_defconfig             | 2 +- > >  arch/mips/configs/ip22_defconfig           | 2 +- > >  arch/mips/configs/ip27_defconfig           | 2 +- > >  arch/unicore32/configs/unicore32_defconfig | 2 +- > >  drivers/thermal/Kconfig                    | 4 ++-- > >  6 files changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/arch/arm/configs/mini2440_defconfig > > b/arch/arm/configs/mini2440_defconfig > > index d95a8059d30b..0cf1c120c4bb 100644 > > --- a/arch/arm/configs/mini2440_defconfig > > +++ b/arch/arm/configs/mini2440_defconfig > > @@ -152,7 +152,7 @@ CONFIG_SPI_S3C24XX=y > >  CONFIG_SPI_SPIDEV=y > >  CONFIG_GPIO_SYSFS=y > >  CONFIG_SENSORS_LM75=y > > -CONFIG_THERMAL=m > > +CONFIG_THERMAL=y > >  CONFIG_WATCHDOG=y > >  CONFIG_S3C2410_WATCHDOG=y > >  CONFIG_FB=y > > diff --git a/arch/arm/configs/pxa_defconfig > > b/arch/arm/configs/pxa_defconfig > > index d4654755b09c..d4f9dda3a52f 100644 > > --- a/arch/arm/configs/pxa_defconfig > > +++ b/arch/arm/configs/pxa_defconfig > > @@ -387,7 +387,7 @@ CONFIG_SENSORS_LM75=m > >  CONFIG_SENSORS_LM90=m > >  CONFIG_SENSORS_LM95245=m > >  CONFIG_SENSORS_NTC_THERMISTOR=m > > -CONFIG_THERMAL=m > > +CONFIG_THERMAL=y > >  CONFIG_WATCHDOG=y > >  CONFIG_XILINX_WATCHDOG=m > >  CONFIG_SA1100_WATCHDOG=m > > diff --git a/arch/mips/configs/ip22_defconfig > > b/arch/mips/configs/ip22_defconfig > > index ff40fbc2f439..21a1168ae301 100644 > > --- a/arch/mips/configs/ip22_defconfig > > +++ b/arch/mips/configs/ip22_defconfig > > @@ -228,7 +228,7 @@ CONFIG_SERIAL_IP22_ZILOG=m > >  # CONFIG_HW_RANDOM is not set > >  CONFIG_RAW_DRIVER=m > >  # CONFIG_HWMON is not set > > -CONFIG_THERMAL=m > > +CONFIG_THERMAL=y > >  CONFIG_WATCHDOG=y > >  CONFIG_INDYDOG=m > >  # CONFIG_VGA_CONSOLE is not set > > diff --git a/arch/mips/configs/ip27_defconfig > > b/arch/mips/configs/ip27_defconfig > > index 81c47e18131b..54db5dedf776 100644 > > --- a/arch/mips/configs/ip27_defconfig > > +++ b/arch/mips/configs/ip27_defconfig > > @@ -271,7 +271,7 @@ CONFIG_I2C_PARPORT_LIGHT=m > >  CONFIG_I2C_TAOS_EVM=m > >  CONFIG_I2C_STUB=m > >  # CONFIG_HWMON is not set > > -CONFIG_THERMAL=m > > +CONFIG_THERMAL=y > >  CONFIG_MFD_PCF50633=m > >  CONFIG_PCF50633_ADC=m > >  CONFIG_PCF50633_GPIO=m > > diff --git a/arch/unicore32/configs/unicore32_defconfig > > b/arch/unicore32/configs/unicore32_defconfig > > index aebd01fc28e5..360cc9abcdb0 100644 > > --- a/arch/unicore32/configs/unicore32_defconfig > > +++ b/arch/unicore32/configs/unicore32_defconfig > > @@ -119,7 +119,7 @@ CONFIG_I2C_PUV3=y > >  # Hardware Monitoring support > >  #CONFIG_SENSORS_LM75=m > >  # Generic Thermal sysfs driver > > -#CONFIG_THERMAL=m > > +#CONFIG_THERMAL=y > >  #CONFIG_THERMAL_HWMON=y > >   > >  # Multimedia support > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig > > index 653aa27a25a4..ccf5b9408d7a 100644 > > --- a/drivers/thermal/Kconfig > > +++ b/drivers/thermal/Kconfig > > @@ -3,7 +3,7 @@ > >  # > >   > >  menuconfig THERMAL > > - tristate "Generic Thermal sysfs driver" > > + bool "Generic Thermal sysfs driver" > >   help > >     Generic Thermal Sysfs driver offers a generic mechanism > > for > >     thermal management. Usually it's made up of one or more > > thermal > > @@ -11,7 +11,7 @@ menuconfig THERMAL > >     Each thermal zone contains its own temperature, trip > > points, > >     cooling devices. > >     All platforms with ACPI thermal support can use this > > driver. > > -   If you want this support, you should say Y or M here. > > +   If you want this support, you should say Y here. > >   > >  if THERMAL > >