These patches fix a couple of issues with the i2c-piix4 driver on AMD Family 16h Model 30h SoCs and add ACPI-based enumeration to the i2c-piix4 driver. Some I2C peripherals, eg. PCA953x IO expander, are not discovered by the probe or detect mechanisms when attached to an SMBus controller that uses the i2c-piix4 SMBus driver. ACPI provides a mechanism to define these peripherals and the controller port that they're attached to. Based on earlier work by Andrew Cooks. Changes: v5: take over from Andrew Cooks who apparently moved to other projects fix style issues reported by Tobin C. Harding fix potential array overrun make sure all registered adapters get unregistered keep ports 3 and 4 on early Hudson2 assume AMD SMBus numbering for ACPI devices v4: remove unnecessary SB800_MAIN_PORTS constant reduce piix4_remove change v3: take chip revision into account when determining port selection register v2: count the adapters, instead of misusing port numbers -- Jean Delvare SUSE L3 Support