diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-12-06 23:13:42 +0100 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2008-02-08 02:39:42 +0100 |
commit | 67b671bceb4a8340a30929e9642620d99ed5ad76 (patch) | |
tree | d302333633bdbd752151933366aaaabfdc60e719 /drivers/hwmon/f71805f.c | |
parent | hwmon: (vt8231) Add missing "space" (diff) | |
download | linux-67b671bceb4a8340a30929e9642620d99ed5ad76.tar.xz linux-67b671bceb4a8340a30929e9642620d99ed5ad76.zip |
hwmon: Let the user override the detected Super-I/O device ID
While it is possible to force SMBus-based hardware monitoring chip
drivers to drive a not officially supported device, we do not have this
possibility for Super-I/O-based drivers. That's unfortunate because
sometimes newer chips are fully compatible and just forcing the driver
to load would work. Instead of that we have to tell the users to
recompile the kernel driver, which isn't an easy task for everyone.
So, I propose that we add a module parameter to all Super-I/O based
hardware monitoring drivers, letting advanced users force the driver
to load on their machine. The user has to provide the device ID of a
supposedly compatible device. This requires looking at the source code or
a datasheet, so I am confident that users can't randomly force a driver
without knowing what they are doing. Thus this should be relatively safe.
As you can see from the code, the implementation is pretty simple and
unintrusive.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Diffstat (limited to 'drivers/hwmon/f71805f.c')
-rw-r--r-- | drivers/hwmon/f71805f.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index 5d9d5cc816a2..7a14a2dbb752 100644 --- a/drivers/hwmon/f71805f.c +++ b/drivers/hwmon/f71805f.c @@ -41,6 +41,10 @@ #include <linux/ioport.h> #include <asm/io.h> +static unsigned short force_id; +module_param(force_id, ushort, 0); +MODULE_PARM_DESC(force_id, "Override the detected device ID"); + static struct platform_device *pdev; #define DRVNAME "f71805f" @@ -1497,7 +1501,7 @@ static int __init f71805f_find(int sioaddr, unsigned short *address, if (devid != SIO_FINTEK_ID) goto exit; - devid = superio_inw(sioaddr, SIO_REG_DEVID); + devid = force_id ? force_id : superio_inw(sioaddr, SIO_REG_DEVID); switch (devid) { case SIO_F71805F_ID: sio_data->kind = f71805f; |