From: Heiko Schocher Date: Wed, 15 Oct 2008 07:37:34 +0000 (+0200) Subject: lm75: Make the LM75 MULTI_BUS compatible. X-Git-Tag: v2009.01-rc1~157^2^2~37 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8e442df438ab677057571e3ac01846bff7719bce;p=u-boot lm75: Make the LM75 MULTI_BUS compatible. Signed-off-by: Heiko Schocher --- diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index f544ebb772..17379e5318 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -155,6 +155,10 @@ int dtt_init (void) const char *const header = "DTT: "; int old_bus; + /* switch to correct I2C bus */ + old_bus = I2C_GET_BUS(); + I2C_SET_BUS(CFG_DTT_BUS_NUM); + for (i = 0; i < sizeof(sensors); i++) { if (_dtt_init(sensors[i]) != 0) printf("%s%d FAILED INIT\n", header, i+1); @@ -162,6 +166,8 @@ int dtt_init (void) printf("%s%d is %i C\n", header, i+1, dtt_get_temp(sensors[i])); } + /* switch back to original I2C bus */ + I2C_SET_BUS(old_bus); return (0); } /* dtt_init() */