re-programming PSWITCH functionality in FSL's linux BSP

Showing results for 
Search instead for 
Did you mean: 

re-programming PSWITCH functionality in FSL's linux BSP

Contributor III

Hi all,


I'm using imx233 in a custom board according to fsl's schematic ...


in the linux bsp release (2.6.31)  I want to change the operation of the imx23 PSWITCH pin such that:


 - while in OFF state pressing PSWITCH will power up the imx23.... this is already implemented

 - While in ON state pressing momentarily suspends/wakes the processor ... already implemented too.


  BUT, this is what I want to add:

 - while in ON state holding down PSWITCH for more than 3sec will shut down the system


  Any help appreciated, ...

Tags (1)
0 Kudos
1 Reply

Senior Contributor III

Hi Daniel,


I'm looking at somewhat similar functionality.  In my application, it makes sense for me to have a separate MCU as a Boost SMPS controller as well as power/PSWITCH control. 


How are you implementing the second option?  I was planning on forking to a new process which executes "echo standby > /sys/power/state" to put the system in standby waiting for the on button to be toggled.  I'm not sure if this is the optimal way of doing it as it resets background DirectFB processes. 


As for the third option, the Power MCU is going to report that the power button was held down for an extended period of time - I was going to fork a new process which executes "halt" followed by the Power MCU will then turn off power to the i.MX233 until such time as the power button is pressed where it will resume power and then toggle PSWITCH to resume booting. 


Note that for the halt & standby command line (busybox) options to work you cannot have a console connection either on ttyAM0 or an active USB connection. 


I realize that you probably don't have access to a separate MCU to control power and the PSWITCH button - but I'm curious to understand how you are planning on implementing the functionality. 





0 Kudos