From: Sylvain Munaut <tnt@246tNt.com>
To: miguel.valero@axxessit.no
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: DS1340 RTC (i2c device)
Date: Mon, 19 Jul 2004 08:58:11 +0200 [thread overview]
Message-ID: <40FB7103.5010603@246tNt.com> (raw)
In-Reply-To: <OFBE3E7E82.C477AD44-ONC1256ED6.0024E631@axxessit.no>
Hi
I'm also planning on using this chip as RTC. The solution I've come up
with currently is to use the RTC that is on the chip (but it doesn't
keep correct time between boots), but leave it uninitialized ( 1 Jan
1970 ), then in userspace, read the external RTC and set the correct
time during boot.
Sylvain Munaut
miguel.valero@axxessit.no wrote:
> Does anyone have any good suggestions about how to handle an i2c
> RTC device, as f.e. the Maxim ds1340 ?
>
> As far as I can understand, the "todc_time" component only supports
> memory mapped RTC devices.
>
> I believe I have to implement my own, platform dependent,
> "time_init", "set_rtc_time" and "get_rtc_time" functions, and
> register them in the ppc_md structure during platform
> initialisation.
>
> I also believe that "time_init" and "get_rtc_time" are called by
> the kernel rather early.
>
> The question is whether the i2c driver is already in place by the
> time these functions are called, so that I can register a driver
> for the ds1340. Has anyone done something like that ? If I am on
> the wrong track, can someone give me a good hint ?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-07-19 6:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-19 6:44 DS1340 RTC (i2c device) miguel.valero
2004-07-19 6:58 ` Sylvain Munaut [this message]
2004-07-19 8:37 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2004-07-19 14:18 Dixon, Myron @ GNS
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=40FB7103.5010603@246tNt.com \
--to=tnt@246tnt.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=miguel.valero@axxessit.no \
/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;
as well as URLs for NNTP newsgroup(s).