Lines Matching full:smbus
3 SMBus driver for nVidia nForce2 MCP
9 SMBus 2.0 driver for AMD-8111 IO-Hub
35 /* Note: we assume there can only be one nForce2, with two SMBus interfaces */
51 MODULE_DESCRIPTION("nForce2/3/4/5xx SMBus driver");
64 * nVidia nForce2 SMBus control register definitions
72 * ACPI 2.0 chapter 13 SMBus 2.0 EC register model
74 #define NVIDIA_SMB_PRTCL (smbus->base + 0x00) /* protocol, PEC */
75 #define NVIDIA_SMB_STS (smbus->base + 0x01) /* status */
76 #define NVIDIA_SMB_ADDR (smbus->base + 0x02) /* address */
77 #define NVIDIA_SMB_CMD (smbus->base + 0x03) /* command */
78 #define NVIDIA_SMB_DATA (smbus->base + 0x04) /* 32 data registers */
79 #define NVIDIA_SMB_BCNT (smbus->base + 0x24) /* number of data
81 #define NVIDIA_SMB_STATUS_ABRT (smbus->base + 0x3c) /* register used to
84 #define NVIDIA_SMB_CTRL (smbus->base + 0x3e) /* control register */
106 /* We disable the second SMBus channel on these boards */
121 SMBus channel */
136 struct nforce2_smbus *smbus = adap->algo_data; in nforce2_abort() local
149 dev_err(&adap->dev, "Can't reset the smbus\n"); in nforce2_abort()
155 struct nforce2_smbus *smbus = adap->algo_data; in nforce2_check_status() local
165 dev_dbg(&adap->dev, "SMBus Timeout!\n"); in nforce2_check_status()
166 if (smbus->can_abort) in nforce2_check_status()
182 struct nforce2_smbus *smbus = adap->algo_data; in nforce2_access() local
319 struct nforce2_smbus *smbus, const char *name) in nforce2_probe_smb() argument
323 smbus->base = pci_resource_start(dev, bar); in nforce2_probe_smb()
324 if (smbus->base) { in nforce2_probe_smb()
325 smbus->size = pci_resource_len(dev, bar); in nforce2_probe_smb()
337 smbus->base = iobase & PCI_BASE_ADDRESS_IO_MASK; in nforce2_probe_smb()
338 smbus->size = 64; in nforce2_probe_smb()
341 error = acpi_check_region(smbus->base, smbus->size, in nforce2_probe_smb()
346 if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) { in nforce2_probe_smb()
347 dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n", in nforce2_probe_smb()
348 smbus->base, smbus->base+smbus->size-1, name); in nforce2_probe_smb()
351 smbus->adapter.owner = THIS_MODULE; in nforce2_probe_smb()
352 smbus->adapter.class = I2C_CLASS_HWMON; in nforce2_probe_smb()
353 smbus->adapter.algo = &smbus_algorithm; in nforce2_probe_smb()
354 smbus->adapter.algo_data = smbus; in nforce2_probe_smb()
355 smbus->adapter.dev.parent = &dev->dev; in nforce2_probe_smb()
356 snprintf(smbus->adapter.name, sizeof(smbus->adapter.name), in nforce2_probe_smb()
357 "SMBus nForce2 adapter at %04x", smbus->base); in nforce2_probe_smb()
359 error = i2c_add_adapter(&smbus->adapter); in nforce2_probe_smb()
361 release_region(smbus->base, smbus->size); in nforce2_probe_smb()
364 dev_info(&smbus->adapter.dev, "nForce2 SMBus adapter at %#x\n", in nforce2_probe_smb()
365 smbus->base); in nforce2_probe_smb()
375 /* we support 2 SMBus adapters */ in nforce2_probe()
391 /* SMBus adapter 1 */ in nforce2_probe()
396 /* SMBus adapter 2 */ in nforce2_probe()