From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] errors in using DS1337
Date: Wed, 30 Jan 2008 10:12:20 -0500 [thread overview]
Message-ID: <47A093D4.4090804@gmail.com> (raw)
In-Reply-To: <BAY131-DS3F61BC1D60BF64AE7F63091360@phx.gbl>
xiangguo_li at hotmail.com wrote:
> hello,
>
> the I2C interface is on hostbridge(Tsi109).
>
> thank you.
>
I assume you're using the tsi108 driver. Please try applying the
following untested patch:
diff --git a/drivers/i2c/tsi108_i2c.c b/drivers/i2c/tsi108_i2c.c
index d6736b0..d337c1f 100644
--- a/drivers/i2c/tsi108_i2c.c
+++ b/drivers/i2c/tsi108_i2c.c
@@ -279,5 +279,20 @@ int i2c_probe (uchar chip)
return i2c_read (chip, 0, 1, (uchar *)&tmp, 1);
}
+uchar i2c_reg_read(uchar i2c_addr, uchar reg)
+{
+ uchar buf;
+
+ i2c_read(i2c_addr, reg, 1, &buf, 1);
+
+ return buf;
+}
+
+void i2c_reg_write(uchar i2c_addr, uchar reg, uchar val)
+{
+ i2c_write(i2c_addr, reg, 1, &val, 1);
+}
+
+
prev parent reply other threads:[~2008-01-30 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 12:18 [U-Boot-Users] errors in using DS1337 xiangguo_li at hotmail.com
2008-01-30 14:23 ` Ben Warren
2008-01-30 14:43 ` xiangguo_li at hotmail.com
2008-01-30 14:48 ` Ben Warren
2008-01-30 15:01 ` xiangguo_li at hotmail.com
2008-01-30 15:12 ` Ben Warren [this message]
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=47A093D4.4090804@gmail.com \
--to=biggerbadderben@gmail.com \
--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