From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 09/16] [PATCH] lm75: Make the LM75 MULTI_BUS compatible.
Date: Wed, 15 Oct 2008 09:37:34 +0200 [thread overview]
Message-ID: <48F59DBE.7050307@denx.de> (raw)
Signed-off-by: Heiko Schocher <hs@denx.de>
---
drivers/hwmon/lm75.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index f544ebb..17379e5 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() */
--
1.5.6.1
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
reply other threads:[~2008-10-15 7:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48F59DBE.7050307@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox