How do I disable the suspend mode in i.mx28 EVK?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I disable the suspend mode in i.mx28 EVK?

1,173 Views
minc
Contributor I

One press on the power button will take the board into suspend mode. I don't need the suspend mode on my target board which is using i.MX28. Can any body tell me how to disable it? Thanks.

Labels (2)
0 Kudos
5 Replies

776 Views
AnsonHuang
NXP Employee
NXP Employee

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.

0 Kudos

776 Views
minc
Contributor I

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?

0 Kudos

776 Views
michaelkoelbl
Contributor III

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.

0 Kudos

776 Views
michaelkoelbl
Contributor III

Problem solved: PSWITCH Interrupt is disabled and not enabled again if suspend is comment out. So add interrupt enable after interrupt status clearing.

776 Views
AnsonHuang
NXP Employee
NXP Employee

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.

0 Kudos