/* Routine: get_expansion_id Description: This function checks for expansion board by checking I2C bus 2 for the availability of an AT24C01B serial EEPROM. returns the device_vendor field from the EEPROM  */
unsigned int get_expansion_id(void)
/* Routine: get_expansion_id Description: This function checks for expansion board by checking I2C bus 2 for the availability of an AT24C01B serial EEPROM. returns the device_vendor field from the EEPROM  */
unsigned int get_expansion_id(void)
{
	if (expansion_config.device_vendor != 0x0)
		return expansion_config.device_vendor;
	i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS);
	if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1) {
		i2c_set_bus_num(TWL4030_I2C_BUS);
		return GUMSTIX_NO_EEPROM;
	}
	i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config,
		 sizeof(expansion_config));
	i2c_set_bus_num(TWL4030_I2C_BUS);
	return expansion_config.device_vendor;
}