Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Trying to use "Resume by alarm" provided by ATX-MBs (was Re: About saving energie)



Hi,

me:
> >g seems to be located at
> >> addresses 0x53, 0x54, 0x55, 0x56.  An area unaccessible using
> '/dev/nvram'.
> >> Due to lack of time I've to give up on this for the moment.
> >

Chris:
> >/dev/nvram is the wrong driver do this IHMO. Better try /dev/rtc. Have a
> look 
> >yourself:
> >  /usr/src/linux/include/rtc.h
> >& /usr/src/linux/drivers/char/rtc.c 
> >
> >rtc.h includes already the appropriate IOCTL for setting the wakeup time,
> but 
> >there is no code dor this feature in rtc.c yet. Alternatively you can try
> to 
> >set the alarm time with this driver (IOCTL RTC_ALM_SET). This seems to be
> the 
> >same, but you can't set the date, only the wakeup time. 
 
Ralf Bauer:
> Last weekend I have written a small program to set the alarm registers of
> the RTC, it worked fine, the interrupt was triggered exactly at the time
> set, but whenever I shut down the PC, the alarm registers were overwritten
> with the values in the BIOS (before the PC was switched off).
> Of course the reason for this could be my BIOS and it could behave
> differently with your BIOS.
> 
> I could post this little program here (it's really just a few lines) and so
> everybody could try it out.

I guess, this might be similar to the 'rtc.c' Chris send to me yesterday.
I've tried that out and the behaviour was exactly as you described.
Tested on my Gigabyte GA-71XE4 mainboard with (AMI) American Megatrends Bios.

After browsing through '/usr/src/linux/drivers/char/rtc.c' (in 2.2.18-SuSE,
if that matters) I believe setting the "resume by alarm"-Timer can't be done
without modifying some kernel driver.  However I still might be wrong.

Another idea would be to modify the apm kernel driver:  The documentation
at http://www.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/WWW/files.html
mentioned earlier in this thread contains a pointer to the description
of BIOS calls, that may be used to manipulate the timer:
http://www.ctyme.com/intr/rb-1414.htm

These BIOS calls belong to the Advanced Power Management v1.2 standard,
so it might make some sense to add support for these to apm.c in the
Linux kernel.

Regards, Peter
-- 
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen)



--- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index