]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
power: reset: Add QEMU virt-ctrl driver
authorKuan-Wei Chiu <visitorckw@gmail.com>
Sun, 12 Apr 2026 21:19:51 +0000 (21:19 +0000)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 13 Apr 2026 10:16:10 +0000 (12:16 +0200)
commitad9d2cd065d15c2ad992cb5db51a5bdc847e2909
tree16a39ed228555970ee972f6effaf2b832022bc85
parentcbd3b8ef970a2a4738c3b237ca8fe3fe5985627e
power: reset: Add QEMU virt-ctrl driver

Add a new driver for the 'virt-ctrl' device found on QEMU virt machines
(e.g. m68k). This device provides a simple interface for system reset
and power off [1].

This driver utilizes the modern system-off API to register callbacks
for both system restart and power off. It also registers a reboot
notifier to catch SYS_HALT events, ensuring that LINUX_REBOOT_CMD_HALT
is properly handled. It is designed to be generic and can be reused by
other architectures utilizing this QEMU device.

Link: https://gitlab.com/qemu-project/qemu/-/blob/v10.2.0/hw/misc/virt_ctrl.c
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260412211952.3564033-2-visitorckw@gmail.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
MAINTAINERS
drivers/power/reset/Kconfig
drivers/power/reset/Makefile
drivers/power/reset/qemu-virt-ctrl.c [new file with mode: 0644]