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 09:23:00 -0500 [thread overview]
Message-ID: <47A08844.1080204@gmail.com> (raw)
In-Reply-To: <BAY131-DS26E105EE082583726291591360@phx.gbl>
Hi lxg,
xiangguo_li at hotmail.com wrote:
> hello,
>
> when I choose to use DS1337, I add definitions in header file:
>
> #define CONFIG_RTC_DS1337
> #define CFG_I2C_RTC_ADDR 0x68
> but, during making process, error appears:
>
> rtc/librtc.a(ds1337.o): in function 'rtc_read':
> .../rtc/ds1337.c: 172: undefined reference to 'i2c_reg_read'
> rtc/librtc.a(ds1337.o): in function 'rtc_write':
> .../rtc/ds1337.c: 178: undefined reference tp 'i2c_reg_write'
>
> how to solve this error?
>
It would help to know what platform you're building for. The functions
mentioned are prototyped in 'i2c.h', but don't appear in all I2C
drivers (I'm thinking of the ARM ones that are in drivers/i2c). If
you're using a controller that has these functions implemented, you
probably don't have your I2C controller properly set up.
Since these functions are always 1-or-2 liner wrappers around
i2c_read()/i2c_write() and always do the same thing, it would probably
be helpful to implement them as static inlines in include/i2c.h. I'll
post a patch to do this some time soon.
regards,
Ben
next prev parent reply other threads:[~2008-01-30 14:23 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 [this message]
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
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=47A08844.1080204@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