[PATCH] New power management and sysfs support for au1x00

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

 



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@xxxxxxxxxxxx
Linux Device Driver                             giometti@xxxxxxxxx
Embedded Systems                     		giometti@xxxxxxxx
UNIX programming                     phone:     +39 349 2432127


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux