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?
-
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”
-
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
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!