eeprom: Add bus argument to eeprom_init()
authorMarek Vasut <marex@denx.de>
Tue, 10 Nov 2015 19:53:31 +0000 (20:53 +0100)
committerTom Rini <trini@konsulko.com>
Sun, 22 Nov 2015 02:50:26 +0000 (21:50 -0500)
commit354e3ed754fea744ff412b1e015b696db08320e3
treeb46abf0507aac3f67b8940660fd60cb2612bb828
parent1a37889b0ad084a740b4f785031d7ae9955d947b
eeprom: Add bus argument to eeprom_init()

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.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Wrap i2c_set_bus_num() call with CONFIG_SYS_I2C test]
Signed-off-by: Tom Rini <trini@konsulko.com>
common/cmd_eeprom.c
common/env_eeprom.c
include/common.h