Here is it. Someone should try it.
Here is it. Someone should try it.
Thanks Oleg, it works:
[admin@WL-HDD harddisk]$ /tmp/harddisk/hwclock.sh --hctosys
Sun Nov 11 20:51:49 MEZ 2007
is it possible, to get it in the next Update for WL-HDD ?
Yes, perhaps. Well, tried on my WL-700gE and it also works (the only change is SDA gpio pin). It use the same ricoh chip.
Well, looks like we need to make general purpose: i.e. allow to specify sda/scl as module parameters.
Btw, does 24h switch destroys current clock setting completely? Or just hour value?
Also, this driver should have automatic devfs registration...
That shouldn't be a problem to implement. I assume you can do this yourself .
The switch to 24h mode doesn't really destroy the setting. Depending on the current time, it just leads to invalid time values within the chip. And according to the data sheet: "Any carry from lower digits with the writing of non-existent time may cause the time counters to malfunction." In any case, I don't think it's worth optimizing this, as it is only relevant the very first time you load the module.Btw, does 24h switch destroys current clock setting completely? Or just hour value?
The driver uses misc_register(), which already does devfs registration.Also, this driver should have automatic devfs registration...
BTW.: Did you need to make any adjustments to my code, or was it already correct?
Last edited by andi; 11-11-2007 at 20:54.
Yes.
Ghm... Right. /dev/misc/rtc is available. I've added hwclock applet to busybox and it works fine.The driver uses misc_register(), which already does devfs registration.
It was correct.BTW.: Did you need to make any adjustments to my code, or was it already correct?
Well, do we still need compatibility with original asus code? I mean reading/writing via /dev/rtc?
Übersicht aller HowTos --- HowTo Overview (mostly german)
WL-HDD mit diesem Setup. --- WL-HDD with this setup.
Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)
Finally, this driver would be available in the firmware. The name was changed to gpiortc to honor existing rtc.c.
Anyway, clock synchronization will now be done automagically during the boot. RTC would be synced back at shutdown/reboot. No need in scripts, etc.
andi, thank you for your work.
Last edited by Oleg; 13-11-2007 at 17:15.
Übersicht aller HowTos --- HowTo Overview (mostly german)
WL-HDD mit diesem Setup. --- WL-HDD with this setup.
Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)