Low power mode support in 3.10.9 kernel

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

Low power mode support in 3.10.9 kernel

1,511 Views
krishnanp
Contributor III

Hello,

I need to enable power saving mode on my i.MX6 Solo based board. The board used same  configuration  of sabrelite  with additional PMIC (PF0100  as pmic).

All I need is to  switch the device  to STANDBY mode based on a GPIO interrupt (looks like mem mode is not supported by the kernel)

These are the power state modes supported in my board.

root@imx6qsabrelite:/# cat /sys/power/state

freeze standby mem

I am also able to make  switch  board to STOP mode by  below command.

root@imx6qsabrelite:~# echo standby > /sys/power/state

PM: Syncing filesystems ... done.

Freezing user space processes ... (elapsed 0.01 seconds) done.

...

...

...

PM: Calling sched_clock_suspend+0x0/0x2c

PM: Calling fw_suspend+0x0/0x24

PM: Calling cpufreq_bp_suspend+0x0/0xc4

PM: Calling cpu_pm_suspend+0x0/0x20

How do I configure a GPIO  as the wake up source?

Appreciate your pointers...

Regards,

Krishnan.

Labels (2)
0 Kudos
2 Replies

525 Views
AnsonHuang
NXP Employee
NXP Employee

From hardware design perspective, to enable an interrupt as an wakeup source of STOP mode, you just need to ensure this interrupt is triggered and its mask bit in GPC is not set, you can refer to the routine imx_gpc_irq_mask in arch/arm/mach-imx/gpc.c. In kernel, you should call enable_irq_wake before suspend, just as Fabio said, you can refer to the code of gpio-key, drivers/input/keyboard/gpio_keys.c, gpio_keys_suspend.

0 Kudos

525 Views
fabio_estevam
NXP Employee
NXP Employee

You can use gpio-key,wakeup.

An example is available here:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/imx6qdl-sabre...

Regards,

Fabio Estevam

0 Kudos