21 #include <linux/kernel.h>
22 #include <linux/module.h>
23 #include <linux/pci.h>
26 #include <linux/i2c.h>
31 #define PM_CFG_REVID 0x08
32 #define PM_CFG_IOBASE0 0x20
33 #define PM_CFG_IOBASE1 0x48
35 #define I2C_DIR (pm_io_base+0x40)
36 #define I2C_OUT (pm_io_base+0x42)
37 #define I2C_IN (pm_io_base+0x44)
45 static u16 pm_io_base;
54 static void bit_via_setscl(
void *
data,
int state)
59 static void bit_via_setsda(
void *data,
int state)
64 static int bit_via_getscl(
void *data)
69 static int bit_via_getsda(
void *data)
76 .setsda = bit_via_setsda,
77 .setscl = bit_via_setscl,
78 .getsda = bit_via_getsda,
79 .getscl = bit_via_getscl,
88 .algo_data = &bit_data,
106 dev_err(&dev->
dev,
"i2c-via: Will only support one host\n");
126 pci_read_config_word(dev, base, &pm_io_base);
127 pm_io_base &= (0xff << 8);
138 vt586b_adapter.
dev.parent = &dev->
dev;
158 .name =
"vt586b_smbus",
159 .id_table = vt586b_ids,
160 .probe = vt586b_probe,