From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752203AbbBVSMH (ORCPT ); Sun, 22 Feb 2015 13:12:07 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:39141 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbbBVSMF (ORCPT ); Sun, 22 Feb 2015 13:12:05 -0500 Message-ID: <54EA1BC4.9080606@roeck-us.net> Date: Sun, 22 Feb 2015 10:11:16 -0800 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: =?UTF-8?B?UGFsaSBSb2jDoXI=?= CC: Arnd Bergmann , Greg Kroah-Hartman , Steven Honeyman , Jean Delvare , 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 References: <201502221250.49466@pali> <54EA12DC.1000403@roeck-us.net> <201502221844.54371@pali> In-Reply-To: <201502221844.54371@pali> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020206.54EA1BF4.00E5,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-Score: 0.001 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: C_4847, X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 2 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/22/2015 09:44 AM, Pali Rohár wrote: > On Sunday 22 February 2015 18:33:16 Guenter Roeck wrote: >> >>> 2) Rename driver from i8k to something like delldiag or >>> dellsmm >> >> Might be problematic, as it would break existing >> configurations unless you keep the CONFIG_I8K but rename the >> driver. Driver names are never perfect, so I would just leave >> it as is. >> >>> 3) Add new CONFIG_ option to enable/disable /proc/i8k device >>> and compile only hwmon interface support >> >> Makes sense. I would suggest to make hwmon suppport the >> default and mandatory if the driver is enabled and add a new >> CONFIG_I8K_PROCIF or similar which should be enabled by >> default. >> > > 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. I would still leave the driver name alone, though; the problem is that "modprobe i8k" is mentioned in pretty much all references to the driver. We could try to make it two separate drivers, one for the hwmon interface and one for the proc interface (which would depend on the hwmon driver), but I am not sure if that is worth it or even feasible. It would save us a bunch of ifdefs in the code, though, so it might be worth looking into. In that case you would have a dell hwmon driver and a dell i8k driver (which would only exist if I8K_PROC is configured). Guenter