提交 8e442df4 编写于 作者: H Heiko Schocher 提交者: Wolfgang Denk

lm75: Make the LM75 MULTI_BUS compatible.

Signed-off-by: NHeiko Schocher <hs@denx.de>
上级 12f16781
......@@ -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() */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册