kernel-fxtec-pro1x/drivers/power/reset
Linus Walleij f7a388d6cd power: reset: Add a driver for the Gemini poweroff
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>
2017-04-14 01:41:33 +02:00
..
arm-versatile-reboot.c
as3722-poweroff.c
at91-poweroff.c power: reset: at91-poweroff: timely shutdown LPDDR memories 2017-01-16 23:21:33 +01:00
at91-reset.c power: reset: at91-reset: remove leftover platform_device_id 2017-01-18 17:05:46 +01:00
at91-sama5d2_shdwc.c power: reset: at91-poweroff: timely shutdown LPDDR memories 2017-01-16 23:21:33 +01:00
axxia-reset.c
brcm-kona-reset.c power: Introduce Broadcom kona reset driver 2016-06-06 16:17:33 -07:00
brcmstb-reboot.c
gemini-poweroff.c power: reset: Add a driver for the Gemini poweroff 2017-04-14 01:41:33 +02:00
gpio-poweroff.c
gpio-restart.c
hisi-reboot.c power: reset: hisi-reboot: Unmap region obtained by of_iomap 2016-08-12 22:42:37 +02:00
imx-snvs-poweroff.c
Kconfig power: reset: Add a driver for the Gemini poweroff 2017-04-14 01:41:33 +02:00
keystone-reset.c power: reset: add in missing white space in error message text 2016-09-19 21:19:46 +02:00
ltc2952-poweroff.c ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
Makefile power: reset: Add a driver for the Gemini poweroff 2017-04-14 01:41:33 +02:00
msm-poweroff.c
piix4-poweroff.c power: reset: Add Intel PIIX4 poweroff driver 2016-10-18 05:13:37 +02:00
qnap-poweroff.c
reboot-mode.c power: reset: reboot-mode: Add managed resource API 2016-08-16 00:29:22 +02:00
reboot-mode.h power: reset: reboot-mode: Add managed resource API 2016-08-16 00:29:22 +02:00
restart-poweroff.c
rmobile-reset.c
st-poweroff.c power: reset: st-poweroff: Remove obsolete platforms. 2016-09-19 21:32:22 +02:00
syscon-poweroff.c power: reset: syscon-poweroff: add a mask property 2017-04-14 01:41:33 +02:00
syscon-reboot-mode.c power: reset: syscon-reboot-mode: Fix module autoload 2016-10-19 05:16:09 +02:00
syscon-reboot.c
vexpress-poweroff.c power: vexpress: make dev_attr_active static 2016-06-13 09:55:51 +01:00
xgene-reboot.c power: reset: xgene-reboot: Unmap region obtained by of_iomap 2016-09-19 21:24:06 +02:00
zx-reboot.c power: reset: zx-reboot: Fix module autoload 2016-10-19 05:16:09 +02:00