I don't know how how linux handles power state implementations. We currently just need to write to a GPIO to shutdown or reset using an IMX6 in linux. I'd know where to put it in wince but I'm kind of confused how linux does it.
imx6q_add_pm_imx I find this but it seems to only handle suspend/wake. I haven't found a very clear answer though via google.
Kevin
This discussion is closed since no activity. If you still need help, please feel free to reply with an update to this discussion, or create another discussion.
Thanks,
Yixing
Kevin
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
Hi, Kevin
Linux kernel has its framework to handle power off and reset, and eventually it will call platform code to finish the flow, so you can put the hardware operation in the platform code, take i.MX6Q sabresd board with kernel v3.0.35 for example as below:
reset:
arch/arm/plat-mxc/system.c, routine named arch_reset, it will call wdog to finish the reset, and kernel will call arch_reset, refer to arch/arm/kernel/process.c. So when you execute "reboot" command from shell, kernel will finish that flow.
power off:
refer to arch/arm/mach-mx6/board-mx6q_sabresd.c, we need to register the pm_power_off routine, kernel will call it eventually when you power off the board from kernel shell. refer to arch/arm/kernel/process.c