提交 4d91d1df 编写于 作者: S Stefan Roese 提交者: Wolfgang Denk

DTT: Issue one-shot command on AD7414 (LM75 code) to read temp

On AD7414 the first value upon bootup is not read correctly.
This is most likely because of the 800ms update time of the
temp register in normal update mode. To get current values
each time we issue the "dtt" command including upon powerup
we switch into one-short mode.

This patch fixes the problem on AD7414 equipped boards (Sequoia,
Canyonlands etc), that temp value printed in the bootup log was
incorrect.
Signed-off-by: NStefan Roese <sr@denx.de>
上级 8c66497e
......@@ -47,6 +47,19 @@ int dtt_read(int sensor, int reg)
int dlen;
uchar data[2];
#ifdef CONFIG_DTT_AD7414
/*
* On AD7414 the first value upon bootup is not read correctly.
* This is most likely because of the 800ms update time of the
* temp register in normal update mode. To get current values
* each time we issue the "dtt" command including upon powerup
* we switch into one-short mode.
*
* Issue one-shot mode command
*/
dtt_write(sensor, DTT_CONFIG, 0x64);
#endif
/*
* Validate 'reg' param
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册