| 114 | | /* ----- commands for the ioctl like i2c_command call: |
| 115 | | * note that additional calls are defined in the algorithm and hw |
| 116 | | * dependent layers - these can be listed here, or see the |
| 117 | | * corresponding header files. |
| | 112 | /* /dev/i2c-X ioctl commands. The ioctl's parameter is always an |
| | 113 | * unsigned long, except for: |
| | 114 | * - I2C_FUNCS, takes pointer to an unsigned long |
| | 115 | * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data |
| | 116 | * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data |
| 119 | | /* -> bit-adapter specific ioctls */ |
| 120 | | #define I2C_RETRIES 0x0701 /* number of times a device address */ |
| 121 | | /* should be polled when not */ |
| 122 | | /* acknowledging */ |
| 123 | | #define I2C_TIMEOUT 0x0702 /* set timeout - call with int */ |
| 124 | | |
| 125 | | |
| 126 | | /* this is for i2c-dev.c */ |
| 127 | | #define I2C_SLAVE 0x0703 /* Change slave address */ |
| 128 | | /* Attn.: Slave address is 7 or 10 bits */ |
| 129 | | #define I2C_SLAVE_FORCE 0x0706 /* Change slave address */ |
| 130 | | /* Attn.: Slave address is 7 or 10 bits */ |
| 131 | | /* This changes the address, even if it */ |
| 132 | | /* is already taken! */ |
| 133 | | #define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */ |
| 134 | | |
| 135 | | #define I2C_FUNCS 0x0705 /* Get the adapter functionality */ |
| 136 | | #define I2C_RDWR 0x0707 /* Combined R/W transfer (one stop only)*/ |
| 137 | | #define I2C_PEC 0x0708 /* != 0 for SMBus PEC */ |
| 138 | | |
| 139 | | #define I2C_SMBUS 0x0720 /* SMBus-level access */ |
| 140 | | |
| 141 | | /* -- i2c.h -- */ |
| 142 | | |
| 143 | | |
| 144 | | /* Note: 10-bit addresses are NOT supported! */ |
| | 118 | #define I2C_RETRIES 0x0701 /* number of times a device address should |
| | 119 | be polled when not acknowledging */ |
| | 120 | #define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ |
| | 121 | |
| | 122 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses |
| | 123 | * are NOT supported! (due to code brokenness) |
| | 124 | */ |
| | 125 | #define I2C_SLAVE 0x0703 /* Use this slave address */ |
| | 126 | #define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it |
| | 127 | is already in use by a driver! */ |
| | 128 | #define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */ |
| | 129 | |
| | 130 | #define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */ |
| | 131 | |
| | 132 | #define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */ |
| | 133 | |
| | 134 | #define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */ |
| | 135 | #define I2C_SMBUS 0x0720 /* SMBus transfer */ |
| | 136 | |