Home/Support/Support Forum/Query regarding MCA GPIO programming and suspend sequence
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Query regarding MCA GPIO programming and suspend sequence

0 votes
I need help in following aspects of connectcore6ul:
•We wanted to know the process to program MCA GPIOs and UART functionality. This below link specifies to use digi apix libraries
https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6ul/yocto-bsp_r_mca-gpio
But we want to control the MCA GPIOs in Suspend/OFF mode. As above link specifies a procedure on programming MCA using connect core libraries, Will the MCA GPIOs be configured during suspend/off mode with this process. If not, how to program the MCA GPIOs to use them in these modes

•Secondly, we planning to use ON/OFF Button that is connected PWR_IO to put system in suspend/ off mode. We want to do a soft suspend process - meaning we would like to close/exit all the programs smoothly before putting in suspend mode through button. How to execute this through programming?
asked Jun 10 in Linux by pragnya.nalla New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
1) You can use MCA GPIOs (those that interrupt capable) to wake up the system from sleep mode. If this is what you mean by "use"

2) on cc6ul the mca/linux is currently:
o when a short press is done in the power button, it is calling mca_pwrkey_sleep_irq_handler() in drivers/input/misc/pwrkey-mca.c
The implementation that Digi does here signals the KEY_SLEEP press so the system goes to sleep.
o when a long press is done in the power button, it is calling mca_pwrkey_power_off_irq_handler() in drivers/input/misc/pwrkey-mca.c
The implementation that Digi does here signals the KEY_POWER press so the system goes to power-off.

So it looks like you should be able to implement some logic in mca_pwrkey_power_off_irq_handler() in drivers/input/misc/pwrkey-mca-cc6ul.c to do what you want
https://github.com/digi-embedded/linux/blob/v4.9/dey-2.4/maint/drivers/input/misc/pwrkey-mca-cc6ul.c
answered Jun 13 by LeonidM Veteran of the Digi Community (2,991 points)
Hi,

Thanks for the reply!

for the first question, by 'use', i mean using the MCA GPIO as a control signal to an external LED driver to lit an LED when system is in Suspend mode. Can we program such a sequence in MCA? If yes, how can we program the MCA to do this

we will try the second suggestion!
...