Re: [PATCH 1/2] power: reset: Add QEMU virt-ctrl driver

From: Kuan-Wei Chiu

Date: Thu Jan 15 2026 - 01:15:42 EST


Hi Daniel,

On Wed, Jan 14, 2026 at 07:01:58PM +0900, Daniel Palmer wrote:
> Hi Kuan-Wei,
>
> On Tue, 13 Jan 2026 at 03:27, Kuan-Wei Chiu <visitorckw@xxxxxxxxx> wrote:
> >
> > 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 registers a restart handler for system reboot and sets the
> > global pm_power_off callback for system shutdown. 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 [1]
> > Signed-off-by: Kuan-Wei Chiu <visitorckw@xxxxxxxxx>
>
> FWIW: I have a driver for this in my "m68k with devicetree" tree. As
> far as I could tell the virt_ctrl thing in QEMU might get more
> features aside from power control.
> So I made it a misc device instead.

Thanks for the note.
Just out of curious, are there currently specific plans to add
non-power features to virt_ctrl?

If new features are added, shouldn't they be exposed via separate
drivers in their respective subsystems, rather than consolidating
everything into a misc driver?

Regards,
Kuan-Wei