the function depend your CPU/Platfrom/OAL function,
below modify at my platform BSP(Mainstone/PXA27x base, it is PQOAL Architecture)
1. study pwrbutton(Power Button) function implement.
2. it is a stream driver has a interrupt in my bsp, so first to %paltform%kerneloal, can found intr.c/power.c
the step need read CPU datasheet, to know register setting how do.
3. Modify BSPPowerOff() due to system api OEMPowerOff() has call it
4. Modify BSPSetWakeSrc() due to KernelIoControl(IOCTL_HAL_ENABLE_WAKE, …) has call it
5. Modify BSPGetWakeSrc()
6. Modify BSPIntrInit()/BSPIntrEnableIrq()/BSPIntrDisableIrq()/BSPIntrDoneIrq()/BSPIntrActiveIrq()/ to add wake-up interrupt/event, other CPU can find OAL interrupt function.