diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 16:44:40 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 16:44:40 -0400 |
| commit | ddb03448274b95bff6df2a2f1a74d7eb4be529d3 (patch) | |
| tree | bd54ec00a4c49ab359a1e7ecce85099f2eedf11d /drivers/i2c/i2c-core.c | |
| parent | dbf7b5915b39bfff548e4c6a3a753fc291a60e25 (diff) | |
| parent | fb604a3d58b79ef722942f664f11dee5e1f73ea4 (diff) | |
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull i2c updates from Jean Delvare:
"The most important changes here are a big cleanup of the i2c-piix4
driver, cleanups and interrupt support to the i2c-i801 driver, and
support for the SCCB protocol."
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
i2c-omap: Add support for I2C_M_STOP message flag
i2c: Fall back to emulated SMBus if the operation isn't supported natively
i2c: Add SCCB support
i2c-tiny-usb: Add support for the Robofuzz OSIF USB/I2C converter
i2c-i801: Enable IRQ for byte_by_byte transactions
i2c-i801: Enable interrupts on ICH5/7/8/9/10
i2c-i801: Enable IRQ for SMBus transactions
i2c-i801: Consolidate polling
i2c-i801: Drop ENABLE_INT9
i2c-i801: Rename some SMBHSTCNT bit constants
i2c-i801: Check and return errors during byte-by-byte transfers
i2c-i801: Clear only status bits in HST_STS
i2c-i801: Refactor use of LAST_BYTE in i801_block_transaction_byte_by_byte
i2c-smbus: Use module_i2c_driver()
i2c/writing-clients: Mention module_i2c_driver()
i2c-piix4: Support AMD auxiliary SMBus controller
i2c-piix4: Separate registration and probing code
i2c-piix4: Eliminate piix4_smba global variable
i2c/busses: Use module_pci_driver
i2c: Update Guenter Roeck's e-mail address
Diffstat (limited to 'drivers/i2c/i2c-core.c')
| -rw-r--r-- | drivers/i2c/i2c-core.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index a6ad32bc0a96..26488aa893d5 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
| @@ -2122,7 +2122,7 @@ s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr, unsigned short flags, | |||
| 2122 | int try; | 2122 | int try; |
| 2123 | s32 res; | 2123 | s32 res; |
| 2124 | 2124 | ||
| 2125 | flags &= I2C_M_TEN | I2C_CLIENT_PEC; | 2125 | flags &= I2C_M_TEN | I2C_CLIENT_PEC | I2C_CLIENT_SCCB; |
| 2126 | 2126 | ||
| 2127 | if (adapter->algo->smbus_xfer) { | 2127 | if (adapter->algo->smbus_xfer) { |
| 2128 | i2c_lock_adapter(adapter); | 2128 | i2c_lock_adapter(adapter); |
| @@ -2140,11 +2140,17 @@ s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr, unsigned short flags, | |||
| 2140 | break; | 2140 | break; |
| 2141 | } | 2141 | } |
| 2142 | i2c_unlock_adapter(adapter); | 2142 | i2c_unlock_adapter(adapter); |
| 2143 | } else | ||
| 2144 | res = i2c_smbus_xfer_emulated(adapter, addr, flags, read_write, | ||
| 2145 | command, protocol, data); | ||
| 2146 | 2143 | ||
| 2147 | return res; | 2144 | if (res != -EOPNOTSUPP || !adapter->algo->master_xfer) |
| 2145 | return res; | ||
| 2146 | /* | ||
| 2147 | * Fall back to i2c_smbus_xfer_emulated if the adapter doesn't | ||
| 2148 | * implement native support for the SMBus operation. | ||
| 2149 | */ | ||
| 2150 | } | ||
| 2151 | |||
| 2152 | return i2c_smbus_xfer_emulated(adapter, addr, flags, read_write, | ||
| 2153 | command, protocol, data); | ||
| 2148 | } | 2154 | } |
| 2149 | EXPORT_SYMBOL(i2c_smbus_xfer); | 2155 | EXPORT_SYMBOL(i2c_smbus_xfer); |
| 2150 | 2156 | ||
