DS1340 RTC (i2c device)

Sylvain Munaut tnt at 246tNt.com
Mon Jul 19 16:58:11 EST 2004


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 at 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/

More information about the Linuxppc-embedded mailing list