Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

Pull i2c update from Jean Delvare:
"This is my last pull request for the i2c subsystem. It includes all
the patches I collected between kernel v3.7-rc1 and me passing i2c
maintenance duties over to Wolfram.

Future patches to the many i2c bus drivers I still maintain will go
through Wolfram's tree."

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
i2c: Mention functionality flags in SMBus protocol documentation
i2c-piix4: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
i2c-i801: Enable interrupts for all post-ICH5 chips
i2c-i801: Add device tree support
MAINTAINERS: Fix drivers/i2c/busses/i2c-stub.c

+37 -23
+31 -9
Documentation/i2c/smbus-protocol
··· 23 23 single data byte, the functions using SMBus protocol operation names execute 24 24 a different protocol operation entirely. 25 25 26 + Each transaction type corresponds to a functionality flag. Before calling a 27 + transaction function, a device driver should always check (just once) for 28 + the corresponding functionality flag to ensure that the underlying I2C 29 + adapter supports the transaction in question. See 30 + <file:Documentation/i2c/functionality> for the details. 31 + 26 32 27 33 Key to symbols 28 34 ============== ··· 55 49 56 50 A Addr Rd/Wr [A] P 57 51 52 + Functionality flag: I2C_FUNC_SMBUS_QUICK 53 + 58 54 59 55 SMBus Receive Byte: i2c_smbus_read_byte() 60 56 ========================================== ··· 68 60 69 61 S Addr Rd [A] [Data] NA P 70 62 63 + Functionality flag: I2C_FUNC_SMBUS_READ_BYTE 64 + 71 65 72 66 SMBus Send Byte: i2c_smbus_write_byte() 73 67 ======================================== ··· 78 68 to a device. See Receive Byte for more information. 79 69 80 70 S Addr Wr [A] Data [A] P 71 + 72 + Functionality flag: I2C_FUNC_SMBUS_WRITE_BYTE 81 73 82 74 83 75 SMBus Read Byte: i2c_smbus_read_byte_data() ··· 90 78 91 79 S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P 92 80 81 + Functionality flag: I2C_FUNC_SMBUS_READ_BYTE_DATA 82 + 93 83 94 84 SMBus Read Word: i2c_smbus_read_word_data() 95 85 ============================================ ··· 101 87 byte. But this time, the data is a complete word (16 bits). 102 88 103 89 S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P 90 + 91 + Functionality flag: I2C_FUNC_SMBUS_READ_WORD_DATA 104 92 105 93 Note the convenience function i2c_smbus_read_word_swapped is 106 94 available for reads where the two data bytes are the other way ··· 118 102 119 103 S Addr Wr [A] Comm [A] Data [A] P 120 104 105 + Functionality flag: I2C_FUNC_SMBUS_WRITE_BYTE_DATA 106 + 121 107 122 108 SMBus Write Word: i2c_smbus_write_word_data() 123 109 ============================================== ··· 129 111 specified through the Comm byte. 130 112 131 113 S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P 114 + 115 + Functionality flag: I2C_FUNC_SMBUS_WRITE_WORD_DATA 132 116 133 117 Note the convenience function i2c_smbus_write_word_swapped is 134 118 available for writes where the two data bytes are the other way ··· 146 126 S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] 147 127 S Addr Rd [A] [DataLow] A [DataHigh] NA P 148 128 129 + Functionality flag: I2C_FUNC_SMBUS_PROC_CALL 130 + 149 131 150 132 SMBus Block Read: i2c_smbus_read_block_data() 151 133 ============================================== ··· 159 137 S Addr Wr [A] Comm [A] 160 138 S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P 161 139 140 + Functionality flag: I2C_FUNC_SMBUS_READ_BLOCK_DATA 141 + 162 142 163 143 SMBus Block Write: i2c_smbus_write_block_data() 164 144 ================================================ ··· 170 146 Comm byte. The amount of data is specified in the Count byte. 171 147 172 148 S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P 149 + 150 + Functionality flag: I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 173 151 174 152 175 153 SMBus Block Write - Block Read Process Call ··· 185 159 186 160 S Addr Wr [A] Comm [A] Count [A] Data [A] ... 187 161 S Addr Rd [A] [Count] A [Data] ... A P 162 + 163 + Functionality flag: I2C_FUNC_SMBUS_BLOCK_PROC_CALL 188 164 189 165 190 166 SMBus Host Notify ··· 257 229 S Addr Wr [A] Comm [A] 258 230 S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P 259 231 260 - 261 - I2C Block Read (2 Comm bytes) 262 - ============================= 263 - 264 - This command reads a block of bytes from a device, from a 265 - designated register that is specified through the two Comm bytes. 266 - 267 - S Addr Wr [A] Comm1 [A] Comm2 [A] 268 - S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P 232 + Functionality flag: I2C_FUNC_SMBUS_READ_I2C_BLOCK 269 233 270 234 271 235 I2C Block Write: i2c_smbus_write_i2c_block_data() ··· 269 249 supported as they are indistinguishable from data. 270 250 271 251 S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P 252 + 253 + Functionality flag: I2C_FUNC_SMBUS_WRITE_I2C_BLOCK
+1 -1
MAINTAINERS
··· 3712 3712 M: "Mark M. Hoffman" <mhoffman@lightlink.com> 3713 3713 L: linux-i2c@vger.kernel.org 3714 3714 S: Maintained 3715 - F: drivers/i2c/busses/i2c-stub.c 3715 + F: drivers/i2c/i2c-stub.c 3716 3716 3717 3717 I2C SUBSYSTEM 3718 3718 M: Wolfram Sang <w.sang@pengutronix.de>
+3 -10
drivers/i2c/busses/i2c-i801.c
··· 81 81 #include <linux/slab.h> 82 82 #include <linux/wait.h> 83 83 #include <linux/err.h> 84 + #include <linux/of_i2c.h> 84 85 85 86 #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ 86 87 defined CONFIG_DMI ··· 1109 1108 /* fall through */ 1110 1109 default: 1111 1110 priv->features |= FEATURE_I2C_BLOCK_READ; 1111 + priv->features |= FEATURE_IRQ; 1112 1112 /* fall through */ 1113 1113 case PCI_DEVICE_ID_INTEL_82801DB_3: 1114 1114 priv->features |= FEATURE_SMBUS_PEC; ··· 1121 1119 case PCI_DEVICE_ID_INTEL_82801AA_3: 1122 1120 break; 1123 1121 } 1124 - 1125 - /* IRQ processing tested on CougarPoint PCH, ICH5, ICH7-M and ICH10 */ 1126 - if (dev->device == PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS || 1127 - dev->device == PCI_DEVICE_ID_INTEL_82801EB_3 || 1128 - dev->device == PCI_DEVICE_ID_INTEL_ICH7_17 || 1129 - dev->device == PCI_DEVICE_ID_INTEL_ICH8_5 || 1130 - dev->device == PCI_DEVICE_ID_INTEL_ICH9_6 || 1131 - dev->device == PCI_DEVICE_ID_INTEL_ICH10_4 || 1132 - dev->device == PCI_DEVICE_ID_INTEL_ICH10_5) 1133 - priv->features |= FEATURE_IRQ; 1134 1122 1135 1123 /* Disable features on user request */ 1136 1124 for (i = 0; i < ARRAY_SIZE(i801_feature_names); i++) { ··· 1207 1215 goto exit_free_irq; 1208 1216 } 1209 1217 1218 + of_i2c_register_devices(&priv->adapter); 1210 1219 i801_probe_optional_slaves(priv); 1211 1220 /* We ignore errors - multiplexing is optional */ 1212 1221 i801_add_mux(priv);
+2 -3
drivers/i2c/busses/i2c-piix4.c
··· 204 204 */ 205 205 pci_write_config_byte(PIIX4_dev, SMBHSTCFG, 206 206 temp | 1); 207 - dev_printk(KERN_NOTICE, &PIIX4_dev->dev, 208 - "WARNING: SMBus interface has been " 209 - "FORCEFULLY ENABLED!\n"); 207 + dev_notice(&PIIX4_dev->dev, 208 + "WARNING: SMBus interface has been FORCEFULLY ENABLED!\n"); 210 209 } else { 211 210 dev_err(&PIIX4_dev->dev, 212 211 "Host SMBus controller not enabled!\n");