APMD-List:
Archives

  
Back

to

APMD

Home

      Index: [thread] [date] [subject] [author]
  From: Craig Markwardt <craigm@pcasun3.gsfc.nasa.gov>
  To  : Edward A. Falk <falconer@best.com>
<Stephen.Rothwell@canb.auug.org.au> Date: Thu, 9 Dec 1999 09:47:42 -0500 (EST)

Re: Control apm

Hi--

I agree that it is *very* desireable to expose a lot more APM
functionality to user-level code.  In the end, it makes it so much
easier to implement a power saving policy.  For example there is
currently no other way to control the screen power from Linux.

Several people (including myself) have submitted patches to do this,
but they have bogged down at the maintainer level, Stephen Rothwell.

Stephen, is there any way we can light a fire under you?  These
submissions show that there is clear interest in having extra
functionality in the APM driver.  Should we keep lobbing patches at
you until some stick?  I know that you are struggling with system- and
compiler-level compatibility problems.

In this case I don't think that compatibility is an issue as much as
it is in the core part of the driver, since user-level programs would
have to take proactive steps to invoke the extra functions.  If it
crashes, well then tough luck.

Craig

Edward A. Falk writes:
 > 
 > 
 > > > 	http://www.best.com/~falconer/apm.tar.gz
 > > 
 > > Without actually looking at your code (sorry, too busy) I'd say that the
 > > ability to enable/disable kernel APM support at run time is very important,
 > > and that I'd prefer that all of these features be merged into the single
 > > 'apm.c' command line program, for the sake of consistency.
 > 
 > I agree.  apm_enable/disable was just a test program for the new
 > kernel driver.  I was planning to move that functionality to
 > apm.c instead.
 > 
 > Here is an executive summary of the ioctls I added to apm_bios.c:
 > 
 >   APM_IOC_CHECK
 > 	Executes bios call 5300 to return information about
 > 	the apm bios.  Not very useful, and I don't think I'd
 > 	keep it.
 > 
 >   APM_IOC_ENABLE
 > 	Enable or disable apm.  Extremely useful.
 > 
 >   APM_IOC_DEFAULTS
 > 	Reset to power-on defaults.  Don't know if it's
 > 	worth keeping.
 > 
 >   APM_IOC_GET_POWER
 > 	Get current power levels.  Doesn't work for retrieving
 > 	individual battery levels, but that might just be the
 > 	bios in my laptop.
 > 
 >   APM_IOC_GET_STATE
 > 	Get the state of individual components.  Doesn't work
 > 	on my laptop.
 > 
 >   APM_IOC_GET_VERSION
 > 	Returns apm protocol version.
 > 
 >   APM_IOC_GET_CAPS
 > 	Return apm bios capabilities.
 > 
 >   APM_IOC_GET_TIMER
 > 	Retrieve resume timer settings.
 > 
 >   APM_IOC_SET_TIMER
 > 	Set resume timer
 > 
 >   APM_IOC_DISABLE_TIMER
 > 	Disable resume timer
 > 
 >   APM_IOC_RING
 > 	Control resume-on-ring function
 > 
 > 
 > I made these changes to the version of apm_bios.c that ships
 > with RH 5.1.
 > 
 > If someone would like to send me a pointer to the latest version
 > of apm_bios.[ch], I'd be happy to do the port.
 > 
 > 	-ed falk
 > 
 > 
 > 
 > 


Index: [thread] [date] [subject] [author]


Write to me! apenwarr@worldvisions.ca