Re: i8k: move driver from char to hwmon
From: Guenter Roeck
Date: Sun Feb 22 2015 - 13:12:18 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/