From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965639AbbDVImu (ORCPT ); Wed, 22 Apr 2015 04:42:50 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:38143 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965612AbbDVImo (ORCPT ); Wed, 22 Apr 2015 04:42:44 -0400 Date: Wed, 22 Apr 2015 10:42:39 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Jean Delvare Cc: Guenter Roeck , Arnd Bergmann , Greg Kroah-Hartman , Steven Honeyman , Valdis.Kletnieks@vt.edu, Jochen Eisinger , Gabriele Mazzotta , linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org Subject: Re: i8k: move driver from char to hwmon Message-ID: <20150422084239.GB13209@pali> References: <201502221250.49466@pali> <54EA12DC.1000403@roeck-us.net> <201502221844.54371@pali> <54EA1BC4.9080606@roeck-us.net> <20150422102304.35d9e2d1@endymion.delvare> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150422102304.35d9e2d1@endymion.delvare> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 22 April 2015 10:23:04 Jean Delvare wrote: > On Sun, 22 Feb 2015 10:11:16 -0800, Guenter Roeck wrote: > > On 02/22/2015 09:44 AM, Pali Rohár wrote: > > > What about CONFIG_DELLDIAG (or DELLSMM or CONFIG_SENSORS_*) for > > > mandatory core & hwmon code and (keep existing) CONFIG_I8K for > > > /proc/i8k? > > > > One option might be to leave CONFIG_I8K more or less alone > > (it is in arch/x86/Kconfig anyway, which is odd by itself), > > but add something like > > select SENSORS_DELL > > select I8K_PROC > > to it. Then add new config options SENSORS_DELL and > > I8K_PROC to drivers/hwmon/Kconfig. > > On a related note... > > Changing Kconfig symbol names is allowed, it has happened a lot in the > past, although we should make it the least painful possible for the > users. > > I thought about it earlier as I considered several times the > possibility to rename all CONFIG_SENSORS_* symbols to CONFIG_HWMON_* > for consistency. I never actually took the time to do it, but here's > how I would do it, taking the lm75 driver as an example. > > As a first step, I would introduce a hidden symbol that would be > selected automatically by the existing symbol: > > drivers/hwmon/Kconfig | 4 ++++ > drivers/hwmon/Makefile | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) > > --- linux-4.1-rc0.orig/drivers/hwmon/Kconfig 2015-04-22 09:54:21.965974944 +0200 > +++ linux-4.1-rc0/drivers/hwmon/Kconfig 2015-04-22 10:10:16.974551936 +0200 > @@ -909,10 +909,14 @@ config SENSORS_LM73 > This driver can also be built as a module. If so, the module > will be called lm73. > > +config HWMON_LM75 > + tristate > + > config SENSORS_LM75 > tristate "National Semiconductor LM75 and compatibles" > depends on I2C > depends on THERMAL || !THERMAL_OF > + select HWMON_LM75 > help > If you say yes here you get support for one common type of > temperature sensor chip, with models including: > --- linux-4.1-rc0.orig/drivers/hwmon/Makefile 2015-04-22 09:54:21.965974944 +0200 > +++ linux-4.1-rc0/drivers/hwmon/Makefile 2015-04-22 10:09:03.712048849 +0200 > @@ -85,7 +85,7 @@ obj-$(CONFIG_SENSORS_LINEAGE) += lineage > obj-$(CONFIG_SENSORS_LM63) += lm63.o > obj-$(CONFIG_SENSORS_LM70) += lm70.o > obj-$(CONFIG_SENSORS_LM73) += lm73.o > -obj-$(CONFIG_SENSORS_LM75) += lm75.o > +obj-$(CONFIG_HWMON_LM75) += lm75.o > obj-$(CONFIG_SENSORS_LM77) += lm77.o > obj-$(CONFIG_SENSORS_LM78) += lm78.o > obj-$(CONFIG_SENSORS_LM80) += lm80.o > > Running "make oldconfig" after that silently selects the new symbol as > needed: > > --- .config.old 2015-04-20 10:16:42.645359313 +0200 > +++ .config 2015-04-22 10:09:09.358164599 +0200 > @@ -2805,6 +2805,7 @@ > CONFIG_SENSORS_LM63=m > # CONFIG_SENSORS_LM70 is not set > CONFIG_SENSORS_LM73=m > +CONFIG_HWMON_LM75=m > CONFIG_SENSORS_LM75=m > CONFIG_SENSORS_LM77=m > CONFIG_SENSORS_LM78=m > > Then I would let several kernel versions pass. After a year maybe, or 5 > kernel versions, we could get rid of the original symbol: > > drivers/hwmon/Kconfig | 4 ---- > 1 file changed, 4 deletions(-) > > --- linux-4.1-rc0.orig/drivers/hwmon/Kconfig 2015-04-22 10:08:39.017542771 +0200 > +++ linux-4.1-rc0/drivers/hwmon/Kconfig 2015-04-22 10:09:57.376149603 +0200 > @@ -910,13 +910,9 @@ config SENSORS_LM73 > will be called lm73. > > config HWMON_LM75 > - tristate > - > -config SENSORS_LM75 > tristate "National Semiconductor LM75 and compatibles" > depends on I2C > depends on THERMAL || !THERMAL_OF > - select HWMON_LM75 > help > If you say yes here you get support for one common type of > temperature sensor chip, with models including: > > Again running "make oldconfig" will do the right thing silently: > > --- .config.old 2015-04-22 10:09:09.358164599 +0200 > +++ .config 2015-04-22 10:10:02.942263851 +0200 > @@ -2806,7 +2806,6 @@ > # CONFIG_SENSORS_LM70 is not set > CONFIG_SENSORS_LM73=m > CONFIG_HWMON_LM75=m > -CONFIG_SENSORS_LM75=m > CONFIG_SENSORS_LM77=m > CONFIG_SENSORS_LM78=m > CONFIG_SENSORS_LM80=m > > This allows for a transparent migration to the new names from a user's > perspective, as long as they do not jump directly from the original > state to the final state. Maybe something like that can be done for > CONFIG_I8K if you want to rename it. > Hi, I already sent rename patch series, see [1]. And Greg will merge it into 4.1-rc2, see [2]. [1] - https://lkml.org/lkml/2015/3/29/35 [2] - https://lkml.org/lkml/2015/4/21/429 -- Pali Rohár pali.rohar@gmail.com