#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/hwmon-sysfs.h>
#include <linux/ioport.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"
enum kinds { f71805f, f71872f };
#define F71805F_LD_HWM 0x04
#define SIO_REG_LDSEL 0x07
#define SIO_REG_DEVID 0x20
#define SIO_REG_DEVREV 0x22
#define SIO_REG_MANID 0x23
#define SIO_REG_FNSEL1 0x29
#define SIO_REG_ENABLE 0x30
#define SIO_REG_ADDR 0x60
#define SIO_FINTEK_ID 0x1934
#define SIO_F71805F_ID 0x0406
#define SIO_F71872F_ID 0x0341
superio_inb(int base, int reg)
superio_inw(int base, int reg)
val = inb(base + 1) << 8;
superio_select(int base, int ld)
outb(SIO_REG_LDSEL, base);
if (!request_muxed_region(base, 2, DRVNAME))