Hi, minchun
In arch/arm/mach-mx28/pm.c, you will see, short press of power button will caused a interrupt which will call suspend_thread_fn function and do suspend, you can just comment out pm_suspend(PM_SUSPEND_STANDBY); then the suspend operation will be gone.
But the long time press will also cause system power off, it you also want to disable the power off function, you can also comment out mx28_pm_power_off in pswitch_check_work routine.
In all, this button will issue an interrupt, and pswitch_interrupt is the handler, you can ignore all operations in it.
Hi Yongcai,
Thanks for your reply. I tried to comment out the line in pm.c. It does disable the suspend mode. But I can't power off the unit any more after a brief press on the power key. It seems it doesn't generate interrupt anymore. Maybe the interrupt was not properly acknowledged when the pm_suspend() is commented out. Are there any other places I have to change in the code?
Hi minchun,
have you solved the problem? We have the same problem. We comment out the suspend mode but we then get no interrupt from PSWITCH for power down. We see that ENIRQ_PSWITCH is disabled inside the ISR but when we enable the bit we get endless IRQs.
Problem solved: PSWITCH Interrupt is disabled and not enabled again if suspend is comment out. So add interrupt enable after interrupt status clearing.
Hi,
I don't think there is anything you need to do. Just comment out pm_suspend(), you can check whether the interrupt handle flow has clear the irq status of PMU and ack the ICOLL.
If the whole system is running well, then I think it is not ICOLL ack's problem. It should be PMU didn't receive the PSwitch's interrupt, so, when you press this key, can you read the HW_POWER_CTRL's PSWITCH_IRQ to see whether we got PSWITCH irq.