lkml.org 
[lkml]   [2015]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: i8k: move driver from char to hwmon
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



\
 
 \ /
  Last update: 2015-02-22 19:21    [W:0.252 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site