Lines Matching refs:the
4 Because not every I2C or SMBus adapter implements everything in the
6 is implemented when it is given the option to attach to an adapter:
7 the client needs some way to check whether an adapter has the needed
14 For the most up-to-date list of functionality constants, please check
19 I2C_FUNC_10BIT_ADDR Handles the 10-bit address extensions
20 I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_IGNORE_NAK,
22 flags (which modify the I2C protocol!)
24 I2C_FUNC_SMBUS_QUICK Handles the SMBus write_quick command
25 I2C_FUNC_SMBUS_READ_BYTE Handles the SMBus read_byte command
26 I2C_FUNC_SMBUS_WRITE_BYTE Handles the SMBus write_byte command
27 I2C_FUNC_SMBUS_READ_BYTE_DATA Handles the SMBus read_byte_data command
28 I2C_FUNC_SMBUS_WRITE_BYTE_DATA Handles the SMBus write_byte_data command
29 I2C_FUNC_SMBUS_READ_WORD_DATA Handles the SMBus read_word_data command
30 I2C_FUNC_SMBUS_WRITE_WORD_DATA Handles the SMBus write_byte_data command
31 I2C_FUNC_SMBUS_PROC_CALL Handles the SMBus process_call command
32 I2C_FUNC_SMBUS_READ_BLOCK_DATA Handles the SMBus read_block_data command
33 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA Handles the SMBus write_block_data command
34 I2C_FUNC_SMBUS_READ_I2C_BLOCK Handles the SMBus read_i2c_block_data command
35 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK Handles the SMBus write_i2c_block_data command
37 A few combinations of the above flags are also defined for your convenience:
39 I2C_FUNC_SMBUS_BYTE Handles the SMBus read_byte
41 I2C_FUNC_SMBUS_BYTE_DATA Handles the SMBus read_byte_data
43 I2C_FUNC_SMBUS_WORD_DATA Handles the SMBus read_word_data
45 I2C_FUNC_SMBUS_BLOCK_DATA Handles the SMBus read_block_data
47 I2C_FUNC_SMBUS_I2C_BLOCK Handles the SMBus read_i2c_block_data
51 the transparent emulation layer)
64 A typical SMBus-only adapter would list all the SMBus transactions it
65 supports. This example comes from the i2c-piix4 driver:
74 A typical full-I2C adapter would use the following (from the i2c-pxa
82 I2C_FUNC_SMBUS_EMUL includes all the SMBus transactions (with the
84 I2C_FUNC_I2C without any help from the adapter driver. The idea is
85 to let the client drivers check for the support of SMBus functions
86 without having to care whether the said functions are implemented in
87 hardware by the adapter, or emulated in software by i2c-core on top
95 whether one of the devices it supports is present on an adapter, it should
96 check whether the needed functionality is present. The typical way to do
97 this is (from the lm75 driver):
108 Here, the lm75 driver checks if the adapter can do both SMBus byte data
109 and SMBus word data transactions. If not, then the driver won't work on
110 this adapter and there's no point in going on. If the check above is
111 successful, then the driver knows that it can call the following
114 thumb, the functionality constants you test for with
115 i2c_check_functionality() should match exactly the i2c_smbus_* functions
118 Note that the check above doesn't tell whether the functionalities are
119 implemented in hardware by the underlying adapter or emulated in
129 to use the /dev interface. You will still have to check whether the
131 the I2C_FUNCS ioctl. An example, adapted from the i2cdetect program, is
144 /* Oops, the needed functionality (SMBus write_quick function) is
148 /* Now it is safe to use the SMBus write_quick command */