aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2008-10-15 09:37:34 +0200
committerWolfgang Denk <wd@denx.de>2008-10-18 21:54:01 +0200
commit8e442df438ab677057571e3ac01846bff7719bce (patch)
treea3a565fea7126e96228db8922683c38b2ee5e2de /drivers/hwmon
parent12f1678127c1df2b2878ba93c88948bedc060775 (diff)
downloadu-boot-linaro-stable-8e442df438ab677057571e3ac01846bff7719bce.tar.gz
lm75: Make the LM75 MULTI_BUS compatible.
Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/lm75.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index f544ebb77..17379e531 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() */