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:
"Two bugfixes for the I2C subsystem"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: mpc: Poll for MCF
misc: eeprom: at24: Always append device id even if label property is set.

+9 -12
+2 -2
drivers/i2c/busses/i2c-mpc.c
··· 635 635 636 636 status = readb(i2c->base + MPC_I2C_SR); 637 637 if (status & CSR_MIF) { 638 - /* Read again to allow register to stabilise */ 639 - status = readb(i2c->base + MPC_I2C_SR); 638 + /* Wait up to 100us for transfer to properly complete */ 639 + readb_poll_timeout(i2c->base + MPC_I2C_SR, status, !(status & CSR_MCF), 0, 100); 640 640 writeb(0, i2c->base + MPC_I2C_SR); 641 641 mpc_i2c_do_intr(i2c, status); 642 642 return IRQ_HANDLED;
+7 -10
drivers/misc/eeprom/at24.c
··· 714 714 } 715 715 716 716 /* 717 - * If the 'label' property is not present for the AT24 EEPROM, 718 - * then nvmem_config.id is initialised to NVMEM_DEVID_AUTO, 719 - * and this will append the 'devid' to the name of the NVMEM 720 - * device. This is purely legacy and the AT24 driver has always 721 - * defaulted to this. However, if the 'label' property is 722 - * present then this means that the name is specified by the 723 - * firmware and this name should be used verbatim and so it is 724 - * not necessary to append the 'devid'. 717 + * We initialize nvmem_config.id to NVMEM_DEVID_AUTO even if the 718 + * label property is set as some platform can have multiple eeproms 719 + * with same label and we can not register each of those with same 720 + * label. Failing to register those eeproms trigger cascade failure 721 + * on such platform. 725 722 */ 723 + nvmem_config.id = NVMEM_DEVID_AUTO; 724 + 726 725 if (device_property_present(dev, "label")) { 727 - nvmem_config.id = NVMEM_DEVID_NONE; 728 726 err = device_property_read_string(dev, "label", 729 727 &nvmem_config.name); 730 728 if (err) 731 729 return err; 732 730 } else { 733 - nvmem_config.id = NVMEM_DEVID_AUTO; 734 731 nvmem_config.name = dev_name(dev); 735 732 } 736 733