[i2c] Question on ds1339's oscillator
Rodolfo Giometti
giometti at enneenne.com
Fri Jun 15 15:38:56 CEST 2007
Hello,
I'm looking at code rtc-ds1307.c in order to add IRQ management support
and I don't understand this code:
/* oscillator is off; need to turn it on */
if ((ds1307->regs[0] & DS1337_BIT_nEOSC)
|| (ds1307->regs[1] & DS1337_BIT_OSF)) {
no_osc_start:
printk(KERN_ERR "no %s oscillator code\n",
chip->name);
goto exit_free;
}
Why if the oscillator is off we cannot use the RTC? Disabling such
code, and the oscillator, the RTC works perfectly.
Anyway if I wish using the IRQ pin I have to disable the square wave
output (INTCN=1 of register 0Eh) so I can keep the oscillator off...
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
More information about the i2c
mailing list