linux-mips
[Top] [All Lists]

[PATCH] New power management and sysfs support for au1x00

To: linux-mips@linux-mips.org
Subject: [PATCH] New power management and sysfs support for au1x00
From: Rodolfo Giometti <giometti@linux.it>
Date: Tue, 23 May 2006 18:40:40 +0200
Organization: GNU/Linux Device Drivers, Embedded Systems and Courses
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11+cvs20060403
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

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] New power management and sysfs support for au1x00, Rodolfo Giometti <=