Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
i2c-i801.c File Reference
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/acpi.h>
#include <linux/io.h>
#include <linux/dmi.h>
#include <linux/slab.h>
#include <linux/wait.h>
#include <linux/err.h>

Go to the source code of this file.

Data Structures

struct  i801_mux_config
 
struct  i801_priv
 

Macros

#define SMBHSTSTS(p)   (0 + (p)->smba)
 
#define SMBHSTCNT(p)   (2 + (p)->smba)
 
#define SMBHSTCMD(p)   (3 + (p)->smba)
 
#define SMBHSTADD(p)   (4 + (p)->smba)
 
#define SMBHSTDAT0(p)   (5 + (p)->smba)
 
#define SMBHSTDAT1(p)   (6 + (p)->smba)
 
#define SMBBLKDAT(p)   (7 + (p)->smba)
 
#define SMBPEC(p)   (8 + (p)->smba) /* ICH3 and later */
 
#define SMBAUXSTS(p)   (12 + (p)->smba) /* ICH4 and later */
 
#define SMBAUXCTL(p)   (13 + (p)->smba) /* ICH4 and later */
 
#define SMBBAR   4
 
#define SMBPCISTS   0x006
 
#define SMBHSTCFG   0x040
 
#define SMBPCISTS_INTS   0x08
 
#define SMBHSTCFG_HST_EN   1
 
#define SMBHSTCFG_SMB_SMI_EN   2
 
#define SMBHSTCFG_I2C_EN   4
 
#define SMBAUXCTL_CRC   1
 
#define SMBAUXCTL_E32B   2
 
#define MAX_RETRIES   400
 
#define I801_QUICK   0x00
 
#define I801_BYTE   0x04
 
#define I801_BYTE_DATA   0x08
 
#define I801_WORD_DATA   0x0C
 
#define I801_PROC_CALL   0x10 /* unimplemented */
 
#define I801_BLOCK_DATA   0x14
 
#define I801_I2C_BLOCK_DATA   0x18 /* ICH5 and later */
 
#define SMBHSTCNT_INTREN   0x01
 
#define SMBHSTCNT_KILL   0x02
 
#define SMBHSTCNT_LAST_BYTE   0x20
 
#define SMBHSTCNT_START   0x40
 
#define SMBHSTCNT_PEC_EN   0x80 /* ICH3 and later */
 
#define SMBHSTSTS_BYTE_DONE   0x80
 
#define SMBHSTSTS_INUSE_STS   0x40
 
#define SMBHSTSTS_SMBALERT_STS   0x20
 
#define SMBHSTSTS_FAILED   0x10
 
#define SMBHSTSTS_BUS_ERR   0x08
 
#define SMBHSTSTS_DEV_ERR   0x04
 
#define SMBHSTSTS_INTR   0x02
 
#define SMBHSTSTS_HOST_BUSY   0x01
 
#define STATUS_ERROR_FLAGS
 
#define STATUS_FLAGS
 
#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS   0x1c22
 
#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS   0x1d22
 
#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0   0x1d70
 
#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1   0x1d71
 
#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2   0x1d72
 
#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS   0x1e22
 
#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS   0x2330
 
#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS   0x3b30
 
#define PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS   0x8c22
 
#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_SMBUS   0x9c22
 
#define FEATURE_SMBUS_PEC   (1 << 0)
 
#define FEATURE_BLOCK_BUFFER   (1 << 1)
 
#define FEATURE_BLOCK_PROC   (1 << 2)
 
#define FEATURE_I2C_BLOCK_READ   (1 << 3)
 
#define FEATURE_IRQ   (1 << 4)
 
#define FEATURE_IDF   (1 << 15)
 
#define i801_suspend   NULL
 
#define i801_resume   NULL
 

Functions

 module_param (disable_features, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (disable_features,"Disable selected driver features")
 
 MODULE_DEVICE_TABLE (pci, i801_ids)
 
 MODULE_AUTHOR ("Mark D. Studebaker <[email protected]>, ""Jean Delvare <[email protected]>")
 
 MODULE_DESCRIPTION ("I801 SMBus driver")
 
 MODULE_LICENSE ("GPL")
 
 module_init (i2c_i801_init)
 
 module_exit (i2c_i801_exit)
 

Macro Definition Documentation

#define FEATURE_BLOCK_BUFFER   (1 << 1)

Definition at line 206 of file i2c-i801.c.

#define FEATURE_BLOCK_PROC   (1 << 2)

Definition at line 207 of file i2c-i801.c.

#define FEATURE_I2C_BLOCK_READ   (1 << 3)

Definition at line 208 of file i2c-i801.c.

#define FEATURE_IDF   (1 << 15)

Definition at line 211 of file i2c-i801.c.

#define FEATURE_IRQ   (1 << 4)

Definition at line 209 of file i2c-i801.c.

#define FEATURE_SMBUS_PEC   (1 << 0)

Definition at line 205 of file i2c-i801.c.

#define I801_BLOCK_DATA   0x14

Definition at line 130 of file i2c-i801.c.

#define I801_BYTE   0x04

Definition at line 126 of file i2c-i801.c.

#define I801_BYTE_DATA   0x08

Definition at line 127 of file i2c-i801.c.

#define I801_I2C_BLOCK_DATA   0x18 /* ICH5 and later */

Definition at line 131 of file i2c-i801.c.

#define I801_PROC_CALL   0x10 /* unimplemented */

Definition at line 129 of file i2c-i801.c.

#define I801_QUICK   0x00

Definition at line 125 of file i2c-i801.c.

#define i801_resume   NULL

Definition at line 1275 of file i2c-i801.c.

#define i801_suspend   NULL

Definition at line 1274 of file i2c-i801.c.

#define I801_WORD_DATA   0x0C

Definition at line 128 of file i2c-i801.c.

#define MAX_RETRIES   400

Definition at line 122 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS   0x3b30

Definition at line 165 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS   0x1c22

Definition at line 157 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS   0x2330

Definition at line 164 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_SMBUS   0x9c22

Definition at line 167 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS   0x8c22

Definition at line 166 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS   0x1e22

Definition at line 163 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS   0x1d22

Definition at line 158 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0   0x1d70

Definition at line 160 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1   0x1d71

Definition at line 161 of file i2c-i801.c.

#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2   0x1d72

Definition at line 162 of file i2c-i801.c.

#define SMBAUXCTL (   p)    (13 + (p)->smba) /* ICH4 and later */

Definition at line 102 of file i2c-i801.c.

#define SMBAUXCTL_CRC   1

Definition at line 118 of file i2c-i801.c.

#define SMBAUXCTL_E32B   2

Definition at line 119 of file i2c-i801.c.

#define SMBAUXSTS (   p)    (12 + (p)->smba) /* ICH4 and later */

Definition at line 101 of file i2c-i801.c.

#define SMBBAR   4

Definition at line 105 of file i2c-i801.c.

#define SMBBLKDAT (   p)    (7 + (p)->smba)

Definition at line 99 of file i2c-i801.c.

#define SMBHSTADD (   p)    (4 + (p)->smba)

Definition at line 96 of file i2c-i801.c.

#define SMBHSTCFG   0x040

Definition at line 107 of file i2c-i801.c.

#define SMBHSTCFG_HST_EN   1

Definition at line 113 of file i2c-i801.c.

#define SMBHSTCFG_I2C_EN   4

Definition at line 115 of file i2c-i801.c.

#define SMBHSTCFG_SMB_SMI_EN   2

Definition at line 114 of file i2c-i801.c.

#define SMBHSTCMD (   p)    (3 + (p)->smba)

Definition at line 95 of file i2c-i801.c.

#define SMBHSTCNT (   p)    (2 + (p)->smba)

Definition at line 94 of file i2c-i801.c.

#define SMBHSTCNT_INTREN   0x01

Definition at line 134 of file i2c-i801.c.

#define SMBHSTCNT_KILL   0x02

Definition at line 135 of file i2c-i801.c.

#define SMBHSTCNT_LAST_BYTE   0x20

Definition at line 136 of file i2c-i801.c.

#define SMBHSTCNT_PEC_EN   0x80 /* ICH3 and later */

Definition at line 138 of file i2c-i801.c.

#define SMBHSTCNT_START   0x40

Definition at line 137 of file i2c-i801.c.

#define SMBHSTDAT0 (   p)    (5 + (p)->smba)

Definition at line 97 of file i2c-i801.c.

#define SMBHSTDAT1 (   p)    (6 + (p)->smba)

Definition at line 98 of file i2c-i801.c.

#define SMBHSTSTS (   p)    (0 + (p)->smba)

Definition at line 93 of file i2c-i801.c.

#define SMBHSTSTS_BUS_ERR   0x08

Definition at line 145 of file i2c-i801.c.

#define SMBHSTSTS_BYTE_DONE   0x80

Definition at line 141 of file i2c-i801.c.

#define SMBHSTSTS_DEV_ERR   0x04

Definition at line 146 of file i2c-i801.c.

#define SMBHSTSTS_FAILED   0x10

Definition at line 144 of file i2c-i801.c.

#define SMBHSTSTS_HOST_BUSY   0x01

Definition at line 148 of file i2c-i801.c.

#define SMBHSTSTS_INTR   0x02

Definition at line 147 of file i2c-i801.c.

#define SMBHSTSTS_INUSE_STS   0x40

Definition at line 142 of file i2c-i801.c.

#define SMBHSTSTS_SMBALERT_STS   0x20

Definition at line 143 of file i2c-i801.c.

#define SMBPCISTS   0x006

Definition at line 106 of file i2c-i801.c.

#define SMBPCISTS_INTS   0x08

Definition at line 110 of file i2c-i801.c.

#define SMBPEC (   p)    (8 + (p)->smba) /* ICH3 and later */

Definition at line 100 of file i2c-i801.c.

#define STATUS_ERROR_FLAGS
Value:
SMBHSTSTS_DEV_ERR)

Definition at line 150 of file i2c-i801.c.

#define STATUS_FLAGS
Value:
STATUS_ERROR_FLAGS)

Definition at line 153 of file i2c-i801.c.

Function Documentation

MODULE_AUTHOR ( "Mark D. Studebaker <[email protected] ,
""Jean Delvare< khali @linux-fr.org >"   
)
MODULE_DESCRIPTION ( "I801 SMBus driver )
MODULE_DEVICE_TABLE ( pci  ,
i801_ids   
)
module_exit ( i2c_i801_exit  )
module_init ( i2c_i801_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( disable_features  ,
uint  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( disable_features  ,
"Disable selected driver features  
)