forked from Minki/linux
f7a388d6cd
The Gemini (SL3516) SoC has a special power controller block that only deal with shutting down the system. If you do not register a driver and activate the block, the power button on the systems utilizing this SoC will do an uncontrolled power cut, which is why it is important to have a special poweroff driver. The most basic functionality is to just shut down the system by writing a special bit in the control register after the system has reached pm_poweroff. It also handles the poweroff from a button or other sources: When the poweroff button is pressed, or a signal is sent to poweroff from an infrared remote control, or when the RTC fires a special alarm (!) the system emits an interrupt. At this point, Linux must acknowledge the interrupt and proceed to do an orderly shutdown of the system. After adding this driver, pressing the poweroff button gives this dmesg: root@gemini:/ root@gemini:/ gemini-poweroff 4b000000.power-controller: poweroff button pressed calling shutdown scripts.. setting /dev/rtc0 from system time unmounting file systems... umount: tmpfs busy - remounted read-only umount: can't unmount /: Invalid argument The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system poweroff uhci_hcd 0000:00:09.1: HCRESET not completed yet! uhci_hcd 0000:00:09.0: HCRESET not completed yet! reboot: Power down gemini-poweroff 4b000000.power-controller: Gemini power off Cc: Janos Laube <janos.dev@gmail.com> Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com> Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-pm@vger.kernel.org Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
29 lines
1.5 KiB
Makefile
29 lines
1.5 KiB
Makefile
obj-$(CONFIG_POWER_RESET_AS3722) += as3722-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_AT91_POWEROFF) += at91-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_AT91_RESET) += at91-reset.o
|
|
obj-$(CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC) += at91-sama5d2_shdwc.o
|
|
obj-$(CONFIG_POWER_RESET_AXXIA) += axxia-reset.o
|
|
obj-$(CONFIG_POWER_RESET_BRCMKONA) += brcm-kona-reset.o
|
|
obj-$(CONFIG_POWER_RESET_BRCMSTB) += brcmstb-reboot.o
|
|
obj-$(CONFIG_POWER_RESET_GEMINI_POWEROFF) += gemini-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o
|
|
obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o
|
|
obj-$(CONFIG_POWER_RESET_IMX) += imx-snvs-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_PIIX4_POWEROFF) += piix4-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_LTC2952) += ltc2952-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_ST) += st-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_VERSATILE) += arm-versatile-reboot.o
|
|
obj-$(CONFIG_POWER_RESET_VEXPRESS) += vexpress-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_XGENE) += xgene-reboot.o
|
|
obj-$(CONFIG_POWER_RESET_KEYSTONE) += keystone-reset.o
|
|
obj-$(CONFIG_POWER_RESET_SYSCON) += syscon-reboot.o
|
|
obj-$(CONFIG_POWER_RESET_SYSCON_POWEROFF) += syscon-poweroff.o
|
|
obj-$(CONFIG_POWER_RESET_RMOBILE) += rmobile-reset.o
|
|
obj-$(CONFIG_POWER_RESET_ZX) += zx-reboot.o
|
|
obj-$(CONFIG_REBOOT_MODE) += reboot-mode.o
|
|
obj-$(CONFIG_SYSCON_REBOOT_MODE) += syscon-reboot-mode.o
|