Skip to content

Commit de4f2f5

Browse files
t-8chAndi Shyti
authored andcommitted
i2c: piix4: Register SPDs
The piix4 I2C bus can carry SPDs, register them if present. Only look on bus 0, as this is where the SPDs seem to be located. Only the first 8 slots are supported. If the system has more, then these will not be visible. The AUX bus can not be probed as on some platforms it reports all devices present and all reads return "0". This would allow the ee1004 to be probed incorrectly. Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
1 parent 8f3075c commit de4f2f5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/i2c/busses/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ config I2C_ISMT
196196
config I2C_PIIX4
197197
tristate "Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC)"
198198
depends on PCI && HAS_IOPORT
199+
select I2C_SMBUS
199200
help
200201
If you say yes to this option, support will be included for the Intel
201202
PIIX4 family of mainboard I2C interfaces. Specifically, the following

drivers/i2c/busses/i2c-piix4.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/stddef.h>
3030
#include <linux/ioport.h>
3131
#include <linux/i2c.h>
32+
#include <linux/i2c-smbus.h>
3233
#include <linux/slab.h>
3334
#include <linux/dmi.h>
3435
#include <linux/acpi.h>
@@ -982,6 +983,14 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
982983
return retval;
983984
}
984985

986+
/*
987+
* The AUX bus can not be probed as on some platforms it reports all
988+
* devices present and all reads return "0".
989+
* This would allow the ee1004 to be probed incorrectly.
990+
*/
991+
if (port == 0)
992+
i2c_register_spd(adap);
993+
985994
*padap = adap;
986995
return 0;
987996
}

0 commit comments

Comments
 (0)