From: Tom Rini Date: Sat, 21 Nov 2015 08:48:22 -0500 Subject: [U-Boot] [PATCH 15/17] eeprom: Add bus argument to eeprom_init() In-Reply-To: <5649BEC2.7040401@denx.de> References: <1447185213-5799-1-git-send-email-marex@denx.de> <1447185213-5799-15-git-send-email-marex@denx.de> <5649BEC2.7040401@denx.de> Message-ID: <20151121134822.GS9551@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: