[U-Boot] [PATCH 15/17] eeprom: Add bus argument to eeprom_init()

Tom Rini trini at konsulko.com
Sat Nov 21 14:48:22 CET 2015


On Mon, Nov 16, 2015 at 12:32:18PM +0100, Heiko Schocher wrote:
> Hello Marek,
> 
> Am 10.11.2015 um 20:53 schrieb Marek Vasut:
> >Add bus argument to eeprom_init(), so that it can select
> >the I2C bus number on which the eeprom resides. Any negative
> >value of the $bus argument will preserve the old behavior.
> >This is in place so that old code does not randomly break.
[snip]
> >@@ -69,6 +69,8 @@ void eeprom_init(void)
> >
> >  	/* I2C EEPROM */
> >  #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C_SOFT)
> >+	if (bus >= 0)
> >+		i2c_set_bus_num(bus);
> >  	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
> >  #endif
> >  }

Note that we need to wrap this call in CONFIG_SYS_I2C as
CONFIG_HARD_I2C doesn't provide this function.  Fixing up and testing
again locally.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151121/bbb130ac/attachment.sig>


More information about the U-Boot mailing list