"Andre M. Hedrick" <hedrick@Astro.Dyer.Vanderbilt.Edu> writes:
>
> The idea would be to wake the system up slowly and re-enable the settings
> prior to sleep. This control code would belong in the APM stuff and call
> the IDE driver code as needed. IMHO is where those controls would be
> useful; however, something named ide-apm.c would be considered also....
Note that the APM code already has an exported interface for other
drivers to register themselves so that they get notified of APM events.
The PCMCIA drivers are the only ones who use it! I am not blaming
anyone but myself for this as I never advertised :-)
You do this: (of coursem depending on CONFIG_APM)
#include <linux/apm_bios.h>
static int apm_handler(apm_event_t event)
{
/*
* handle the event and return when things are
* as you would like them. events are listed
* in apm_bios.h.
*/
}
if ((error = apm_register_callback(apm_handler)) != 0)
/* only error currently is -ENOMEM */
You can also change your mind :-)
apm_unregister_callback(apm_handler);
The interface is a little low level (now that ACPI is on the horizon)
but can still be useful.
Cheers,
Stephen
The Linux APM guy :-)
-- Stephen Rothwell Stephen.Rothwell@canb.auug.org.au http://www.canb.auug.org.au/~sfr/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/