aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-28 17:04:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-28 17:04:53 -0400
commit07d43ba98621f08e252a48c96b258b4d572b0257 (patch)
treec5dd8be6b2032b02fb2a27a91b02a55d54ed702d /include
parent0fe41b8982001cd14ee2c77cd776735a5024e98b (diff)
parent09b8ce0a691d8e76f14a16ac6cbfde899f6c68e3 (diff)
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c-core: Some style cleanups i2c-piix4: Add support for the Broadcom HT1100 chipset i2c-piix4: Add support to SB800 SMBus changes i2c-pca-platform: Use defaults if no platform_data given i2c-algo-pca: Use timeout for checking the state machine i2c-algo-pca: Rework waiting for a free bus i2c-algo-pca: Add PCA9665 support i2c: Adapt debug macros for KERN_* constants i2c-davinci: Fix timeout handling i2c: Adapter timeout is in jiffies i2c: Set a default timeout value for all adapters i2c: Add missing KERN_* constants to printks i2c-algo-pcf: Handle timeout correctly i2c-algo-pcf: Style cleanups eeprom/at24: Remove EXPERIMENTAL i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79 i2c: Clarify which clients are auto-removed i2c: Let checkpatch shout on users of the legacy model i2c: Document the different ways to instantiate i2c devices
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c-algo-pca.h33
-rw-r--r--include/linux/i2c-pca-platform.h2
-rw-r--r--include/linux/pci_ids.h5
3 files changed, 37 insertions, 3 deletions
diff --git a/include/linux/i2c-algo-pca.h b/include/linux/i2c-algo-pca.h
index adcb3dc7ac26..1364d62e2fbe 100644
--- a/include/linux/i2c-algo-pca.h
+++ b/include/linux/i2c-algo-pca.h
@@ -1,7 +1,14 @@
1#ifndef _LINUX_I2C_ALGO_PCA_H 1#ifndef _LINUX_I2C_ALGO_PCA_H
2#define _LINUX_I2C_ALGO_PCA_H 2#define _LINUX_I2C_ALGO_PCA_H
3 3
4/* Clock speeds for the bus */ 4/* Chips known to the pca algo */
5#define I2C_PCA_CHIP_9564 0x00
6#define I2C_PCA_CHIP_9665 0x01
7
8/* Internal period for PCA9665 oscilator */
9#define I2C_PCA_OSC_PER 3 /* e10-8s */
10
11/* Clock speeds for the bus for PCA9564*/
5#define I2C_PCA_CON_330kHz 0x00 12#define I2C_PCA_CON_330kHz 0x00
6#define I2C_PCA_CON_288kHz 0x01 13#define I2C_PCA_CON_288kHz 0x01
7#define I2C_PCA_CON_217kHz 0x02 14#define I2C_PCA_CON_217kHz 0x02
@@ -18,6 +25,26 @@
18#define I2C_PCA_ADR 0x02 /* OWN ADR Read/Write */ 25#define I2C_PCA_ADR 0x02 /* OWN ADR Read/Write */
19#define I2C_PCA_CON 0x03 /* CONTROL Read/Write */ 26#define I2C_PCA_CON 0x03 /* CONTROL Read/Write */
20 27
28/* PCA9665 registers */
29#define I2C_PCA_INDPTR 0x00 /* INDIRECT Pointer Write Only */
30#define I2C_PCA_IND 0x02 /* INDIRECT Read/Write */
31
32/* PCA9665 indirect registers */
33#define I2C_PCA_ICOUNT 0x00 /* Byte Count for buffered mode */
34#define I2C_PCA_IADR 0x01 /* OWN ADR */
35#define I2C_PCA_ISCLL 0x02 /* SCL LOW period */
36#define I2C_PCA_ISCLH 0x03 /* SCL HIGH period */
37#define I2C_PCA_ITO 0x04 /* TIMEOUT */
38#define I2C_PCA_IPRESET 0x05 /* Parallel bus reset */
39#define I2C_PCA_IMODE 0x06 /* I2C Bus mode */
40
41/* PCA9665 I2C bus mode */
42#define I2C_PCA_MODE_STD 0x00 /* Standard mode */
43#define I2C_PCA_MODE_FAST 0x01 /* Fast mode */
44#define I2C_PCA_MODE_FASTP 0x02 /* Fast Plus mode */
45#define I2C_PCA_MODE_TURBO 0x03 /* Turbo mode */
46
47
21#define I2C_PCA_CON_AA 0x80 /* Assert Acknowledge */ 48#define I2C_PCA_CON_AA 0x80 /* Assert Acknowledge */
22#define I2C_PCA_CON_ENSIO 0x40 /* Enable */ 49#define I2C_PCA_CON_ENSIO 0x40 /* Enable */
23#define I2C_PCA_CON_STA 0x20 /* Start */ 50#define I2C_PCA_CON_STA 0x20 /* Start */
@@ -31,7 +58,9 @@ struct i2c_algo_pca_data {
31 int (*read_byte) (void *data, int reg); 58 int (*read_byte) (void *data, int reg);
32 int (*wait_for_completion) (void *data); 59 int (*wait_for_completion) (void *data);
33 void (*reset_chip) (void *data); 60 void (*reset_chip) (void *data);
34 /* i2c_clock values are defined in linux/i2c-algo-pca.h */ 61 /* For PCA9564, use one of the predefined frequencies:
62 * 330000, 288000, 217000, 146000, 88000, 59000, 44000, 36000
63 * For PCA9665, use the frequency you want here. */
35 unsigned int i2c_clock; 64 unsigned int i2c_clock;
36}; 65};
37 66
diff --git a/include/linux/i2c-pca-platform.h b/include/linux/i2c-pca-platform.h
index 3d191873f2d1..aba33759dec4 100644
--- a/include/linux/i2c-pca-platform.h
+++ b/include/linux/i2c-pca-platform.h
@@ -6,7 +6,7 @@ struct i2c_pca9564_pf_platform_data {
6 * not supplied (negative value), but it 6 * not supplied (negative value), but it
7 * cannot exit some error conditions then */ 7 * cannot exit some error conditions then */
8 int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */ 8 int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */
9 int timeout; /* timeout = this value * 10us */ 9 int timeout; /* timeout in jiffies */
10}; 10};
11 11
12#endif /* I2C_PCA9564_PLATFORM_H */ 12#endif /* I2C_PCA9564_PLATFORM_H */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 05dfa7c4fb64..2c9e8080da5e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1237,6 +1237,7 @@
1237#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 1237#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451
1238#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 1238#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452
1239#define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 1239#define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453
1240#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_SMBUS 0x0542
1240#define PCI_DEVICE_ID_NVIDIA_NVENET_24 0x054C 1241#define PCI_DEVICE_ID_NVIDIA_NVENET_24 0x054C
1241#define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D 1242#define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D
1242#define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E 1243#define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E
@@ -1247,11 +1248,14 @@
1247#define PCI_DEVICE_ID_NVIDIA_NVENET_31 0x07DF 1248#define PCI_DEVICE_ID_NVIDIA_NVENET_31 0x07DF
1248#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 1249#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560
1249#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C 1250#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C
1251#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP78S_SMBUS 0x0752
1250#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 1252#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759
1251#define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760 1253#define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760
1252#define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 1254#define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761
1253#define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 1255#define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762
1254#define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 1256#define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763
1257#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8
1258#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2
1255#define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0 1259#define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0
1256#define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1 1260#define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1
1257#define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2 1261#define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2
@@ -1475,6 +1479,7 @@
1475#define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214 1479#define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214
1476#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217 1480#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217
1477#define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227 1481#define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227
1482#define PCI_DEVICE_ID_SERVERWORKS_HT1100LD 0x0408
1478 1483
1479#define PCI_VENDOR_ID_SBE 0x1176 1484#define PCI_VENDOR_ID_SBE 0x1176
1480#define PCI_DEVICE_ID_SBE_WANXL100 0x0301 1485#define PCI_DEVICE_ID_SBE_WANXL100 0x0301