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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
"I2C has a bunch of driver fixes and a core improvement to make the
on-going API transition more robust"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: mediatek: disable zero-length transfers for mt8183
i2c: iproc: Stop advertising support of SMBUS quick cmd
MAINTAINERS: i2c mv64xxx: Update documentation path
i2c: piix4: Fix port selection for AMD Family 16h Model 30h
i2c: designware: Synchronize IRQs when unregistering slave client
i2c: i801: Avoid memory leak in check_acpi_smo88xx_device()
i2c: make i2c_unregister_device() ERR_PTR safe

+34 -14
+1 -1
MAINTAINERS
··· 7513 7513 M: Gregory CLEMENT <gregory.clement@bootlin.com> 7514 7514 L: linux-i2c@vger.kernel.org 7515 7515 S: Maintained 7516 - F: Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt 7516 + F: Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml 7517 7517 F: drivers/i2c/busses/i2c-mv64xxx.c 7518 7518 7519 7519 I2C OVER PARALLEL PORT
+4 -1
drivers/i2c/busses/i2c-bcm-iproc.c
··· 790 790 791 791 static uint32_t bcm_iproc_i2c_functionality(struct i2c_adapter *adap) 792 792 { 793 - u32 val = I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 793 + u32 val; 794 + 795 + /* We do not support the SMBUS Quick command */ 796 + val = I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK); 794 797 795 798 if (adap->algo->reg_slave) 796 799 val |= I2C_FUNC_SLAVE;
+1
drivers/i2c/busses/i2c-designware-slave.c
··· 94 94 95 95 dev->disable_int(dev); 96 96 dev->disable(dev); 97 + synchronize_irq(dev->irq); 97 98 dev->slave = NULL; 98 99 pm_runtime_put(dev->dev); 99 100
+12 -3
drivers/i2c/busses/i2c-i801.c
··· 1194 1194 int i; 1195 1195 1196 1196 status = acpi_get_object_info(obj_handle, &info); 1197 - if (!ACPI_SUCCESS(status) || !(info->valid & ACPI_VALID_HID)) 1197 + if (ACPI_FAILURE(status)) 1198 1198 return AE_OK; 1199 + 1200 + if (!(info->valid & ACPI_VALID_HID)) 1201 + goto smo88xx_not_found; 1199 1202 1200 1203 hid = info->hardware_id.string; 1201 1204 if (!hid) 1202 - return AE_OK; 1205 + goto smo88xx_not_found; 1203 1206 1204 1207 i = match_string(acpi_smo8800_ids, ARRAY_SIZE(acpi_smo8800_ids), hid); 1205 1208 if (i < 0) 1206 - return AE_OK; 1209 + goto smo88xx_not_found; 1210 + 1211 + kfree(info); 1207 1212 1208 1213 *((bool *)return_value) = true; 1209 1214 return AE_CTRL_TERMINATE; 1215 + 1216 + smo88xx_not_found: 1217 + kfree(info); 1218 + return AE_OK; 1210 1219 } 1211 1220 1212 1221 static bool is_dell_system_with_lis3lv02d(void)
+10 -1
drivers/i2c/busses/i2c-mt65xx.c
··· 234 234 .max_num_msgs = 255, 235 235 }; 236 236 237 + static const struct i2c_adapter_quirks mt8183_i2c_quirks = { 238 + .flags = I2C_AQ_NO_ZERO_LEN, 239 + }; 240 + 237 241 static const struct mtk_i2c_compatible mt2712_compat = { 238 242 .regs = mt_i2c_regs_v1, 239 243 .pmic_i2c = 0, ··· 302 298 }; 303 299 304 300 static const struct mtk_i2c_compatible mt8183_compat = { 301 + .quirks = &mt8183_i2c_quirks, 305 302 .regs = mt_i2c_regs_v2, 306 303 .pmic_i2c = 0, 307 304 .dcm = 0, ··· 875 870 876 871 static u32 mtk_i2c_functionality(struct i2c_adapter *adap) 877 872 { 878 - return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 873 + if (adap->quirks->flags & I2C_AQ_NO_ZERO_LEN) 874 + return I2C_FUNC_I2C | 875 + (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK); 876 + else 877 + return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 879 878 } 880 879 881 880 static const struct i2c_algorithm mtk_i2c_algorithm = {
+5 -7
drivers/i2c/busses/i2c-piix4.c
··· 91 91 #define SB800_PIIX4_PORT_IDX_MASK 0x06 92 92 #define SB800_PIIX4_PORT_IDX_SHIFT 1 93 93 94 - /* On kerncz, SmBus0Sel is at bit 20:19 of PMx00 DecodeEn */ 94 + /* On kerncz and Hudson2, SmBus0Sel is at bit 20:19 of PMx00 DecodeEn */ 95 95 #define SB800_PIIX4_PORT_IDX_KERNCZ 0x02 96 96 #define SB800_PIIX4_PORT_IDX_MASK_KERNCZ 0x18 97 97 #define SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ 3 ··· 358 358 /* Find which register is used for port selection */ 359 359 if (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD || 360 360 PIIX4_dev->vendor == PCI_VENDOR_ID_HYGON) { 361 - switch (PIIX4_dev->device) { 362 - case PCI_DEVICE_ID_AMD_KERNCZ_SMBUS: 361 + if (PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS || 362 + (PIIX4_dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS && 363 + PIIX4_dev->revision >= 0x1F)) { 363 364 piix4_port_sel_sb800 = SB800_PIIX4_PORT_IDX_KERNCZ; 364 365 piix4_port_mask_sb800 = SB800_PIIX4_PORT_IDX_MASK_KERNCZ; 365 366 piix4_port_shift_sb800 = SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ; 366 - break; 367 - case PCI_DEVICE_ID_AMD_HUDSON2_SMBUS: 368 - default: 367 + } else { 369 368 piix4_port_sel_sb800 = SB800_PIIX4_PORT_IDX_ALT; 370 369 piix4_port_mask_sb800 = SB800_PIIX4_PORT_IDX_MASK; 371 370 piix4_port_shift_sb800 = SB800_PIIX4_PORT_IDX_SHIFT; 372 - break; 373 371 } 374 372 } else { 375 373 if (!request_muxed_region(SB800_PIIX4_SMB_IDX, 2,
+1 -1
drivers/i2c/i2c-core-base.c
··· 832 832 */ 833 833 void i2c_unregister_device(struct i2c_client *client) 834 834 { 835 - if (!client) 835 + if (IS_ERR_OR_NULL(client)) 836 836 return; 837 837 838 838 if (client->dev.of_node) {