Hello,
here:
http://ftp.enneenne.com/pub/misc/au1100-patches/linux/patch-pm-sysfs
my new patch for power management and sysfs support for au1x00
CPUs. This patch is against linux 2.6.17-rc4 and has been tested with
an au1100 based board.
To suspend your system for 3 seconds use:
# echo mem > /sys/power/state
the default behaviour can be changed per board basis by defining a
special function as follow:
#ifdef CONFIG_PM
int my_board_before_sleep(void)
{
/* do whatever you want before sleeping */
/* then return the wake up reason */
return 1<<6; /* wait for GPIO 6 changes */
}
void my_board_after_sleep(int reason)
{
/* do whatever you want after sleeping */
}
#endif
void __init board_setup(void)
{
...
#ifdef CONFIG_PM
/* Setup sleeping functions */
board_before_sleep = my_board_before_sleep;
board_after_sleep = my_board_after_sleep;
#endif
...
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
|