* [PATCH 0/3] hw/input: Convert remaining input devices to Resettable interface
@ 2026-11-30 14:32 Oscar Alejandro Sánchez Lucero
2026-11-30 14:32 ` [PATCH 1/3] hw/input/adb-kbd: Convert " Oscar Alejandro Sánchez Lucero
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-11-30 14:32 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Michael S. Tsirkin, Paolo Bonzini,
Oscar Alejandro Sánchez Lucero
Convert the remaining input devices in hw/input/ from the deprecated
device_class_set_legacy_reset() interface to the Resettable interface
(hold phase).
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
Oscar Alejandro Sánchez Lucero (3):
hw/input/adb-kbd: Convert to Resettable interface
hw/input/adb-mouse: Convert to Resettable interface
hw/input/pckbd: Convert to Resettable interface
hw/input/adb-kbd.c | 8 ++++----
hw/input/adb-mouse.c | 8 ++++----
hw/input/pckbd.c | 14 ++++++++------
3 files changed, 16 insertions(+), 14 deletions(-)
---
base-commit: 9751c62358073580cbf330a4df22077a7c6a407c
change-id: 20261130-input-resettable-636a10fb3d49
Best regards,
--
Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] hw/input/adb-kbd: Convert to Resettable interface
2026-11-30 14:32 [PATCH 0/3] hw/input: Convert remaining input devices to Resettable interface Oscar Alejandro Sánchez Lucero
@ 2026-11-30 14:32 ` Oscar Alejandro Sánchez Lucero
2026-12-01 13:14 ` Bin Meng
2026-11-30 14:32 ` [PATCH 2/3] hw/input/adb-mouse: " Oscar Alejandro Sánchez Lucero
2026-11-30 14:32 ` [PATCH 3/3] hw/input/pckbd: " Oscar Alejandro Sánchez Lucero
2 siblings, 1 reply; 7+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-11-30 14:32 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Michael S. Tsirkin, Paolo Bonzini,
Oscar Alejandro Sánchez Lucero
Replace the deprecated device_class_set_legacy_reset() with the
Resettable interface by implementing the hold phase in
adb_kbd_reset_hold().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
hw/input/adb-kbd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c
index ece51d5..ffd5bf8 100644
--- a/hw/input/adb-kbd.c
+++ b/hw/input/adb-kbd.c
@@ -342,10 +342,10 @@ static const VMStateDescription vmstate_adb_kbd = {
}
};
-static void adb_kbd_reset(DeviceState *dev)
+static void adb_kbd_reset_hold(Object *obj, ResetType type)
{
- ADBDevice *d = ADB_DEVICE(dev);
- KBDState *s = ADB_KEYBOARD(dev);
+ ADBDevice *d = ADB_DEVICE(obj);
+ KBDState *s = ADB_KEYBOARD(obj);
d->handler = 1;
d->devaddr = ADB_DEVID_KEYBOARD;
@@ -400,7 +400,7 @@ static void adb_kbd_class_init(ObjectClass *oc, const void *data)
adc->devreq = adb_kbd_request;
adc->devhasdata = adb_kbd_has_data;
- device_class_set_legacy_reset(dc, adb_kbd_reset);
+ RESETTABLE_CLASS(oc)->phases.hold = adb_kbd_reset_hold;
dc->vmsd = &vmstate_adb_kbd;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] hw/input/adb-mouse: Convert to Resettable interface
2026-11-30 14:32 [PATCH 0/3] hw/input: Convert remaining input devices to Resettable interface Oscar Alejandro Sánchez Lucero
2026-11-30 14:32 ` [PATCH 1/3] hw/input/adb-kbd: Convert " Oscar Alejandro Sánchez Lucero
@ 2026-11-30 14:32 ` Oscar Alejandro Sánchez Lucero
2026-12-01 13:15 ` Bin Meng
2026-11-30 14:32 ` [PATCH 3/3] hw/input/pckbd: " Oscar Alejandro Sánchez Lucero
2 siblings, 1 reply; 7+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-11-30 14:32 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Michael S. Tsirkin, Paolo Bonzini,
Oscar Alejandro Sánchez Lucero
Replace the deprecated device_class_set_legacy_reset() with the
Resettable interface by implementing the hold phase in
adb_mouse_reset_hold().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
hw/input/adb-mouse.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/input/adb-mouse.c b/hw/input/adb-mouse.c
index 5dcdc85..63de27f 100644
--- a/hw/input/adb-mouse.c
+++ b/hw/input/adb-mouse.c
@@ -239,10 +239,10 @@ static bool adb_mouse_has_data(ADBDevice *d)
s->dx == 0 && s->dy == 0);
}
-static void adb_mouse_reset(DeviceState *dev)
+static void adb_mouse_reset_hold(Object *obj, ResetType type)
{
- ADBDevice *d = ADB_DEVICE(dev);
- MouseState *s = ADB_MOUSE(dev);
+ ADBDevice *d = ADB_DEVICE(obj);
+ MouseState *s = ADB_MOUSE(obj);
d->handler = 2;
d->devaddr = ADB_DEVID_MOUSE;
@@ -295,7 +295,7 @@ static void adb_mouse_class_init(ObjectClass *oc, const void *data)
adc->devreq = adb_mouse_request;
adc->devhasdata = adb_mouse_has_data;
- device_class_set_legacy_reset(dc, adb_mouse_reset);
+ RESETTABLE_CLASS(oc)->phases.hold = adb_mouse_reset_hold;
dc->vmsd = &vmstate_adb_mouse;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] hw/input/pckbd: Convert to Resettable interface
2026-11-30 14:32 [PATCH 0/3] hw/input: Convert remaining input devices to Resettable interface Oscar Alejandro Sánchez Lucero
2026-11-30 14:32 ` [PATCH 1/3] hw/input/adb-kbd: Convert " Oscar Alejandro Sánchez Lucero
2026-11-30 14:32 ` [PATCH 2/3] hw/input/adb-mouse: " Oscar Alejandro Sánchez Lucero
@ 2026-11-30 14:32 ` Oscar Alejandro Sánchez Lucero
2026-12-01 13:15 ` Bin Meng
2 siblings, 1 reply; 7+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-11-30 14:32 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, qemu-ppc, Michael S. Tsirkin, Paolo Bonzini,
Oscar Alejandro Sánchez Lucero
Replace the deprecated device_class_set_legacy_reset() with the
Resettable interface by implementing the hold phase in
i8042_mmio_reset_hold() and i8042_reset_hold().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
hw/input/pckbd.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 0250252..b75845a 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -682,9 +682,9 @@ static void i8042_mmio_set_mouse_irq(void *opaque, int n, int level)
kbd_update_aux_irq(ks, level);
}
-static void i8042_mmio_reset(DeviceState *dev)
+static void i8042_mmio_reset_hold(Object *obj, ResetType type)
{
- MMIOKBDState *s = I8042_MMIO(dev);
+ MMIOKBDState *s = I8042_MMIO(obj);
KBDState *ks = &s->kbd;
kbd_reset(ks);
@@ -753,9 +753,10 @@ static const VMStateDescription vmstate_kbd_mmio = {
static void i8042_mmio_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
dc->realize = i8042_mmio_realize;
- device_class_set_legacy_reset(dc, i8042_mmio_reset);
+ rc->phases.hold = i8042_mmio_reset_hold;
dc->vmsd = &vmstate_kbd_mmio;
device_class_set_props(dc, i8042_mmio_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
@@ -824,9 +825,9 @@ static void i8042_set_mouse_irq(void *opaque, int n, int level)
}
-static void i8042_reset(DeviceState *dev)
+static void i8042_reset_hold(Object *obj, ResetType type)
{
- ISAKBDState *s = I8042(dev);
+ ISAKBDState *s = I8042(obj);
KBDState *ks = &s->kbd;
kbd_reset(ks);
@@ -944,9 +945,10 @@ static void i8042_class_initfn(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
AcpiDevAmlIfClass *adevc = ACPI_DEV_AML_IF_CLASS(klass);
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
device_class_set_props(dc, i8042_properties);
- device_class_set_legacy_reset(dc, i8042_reset);
+ rc->phases.hold = i8042_reset_hold;
dc->realize = i8042_realizefn;
dc->vmsd = &vmstate_kbd_isa;
adevc->build_dev_aml = i8042_build_aml;
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] hw/input/adb-kbd: Convert to Resettable interface
2026-11-30 14:32 ` [PATCH 1/3] hw/input/adb-kbd: Convert " Oscar Alejandro Sánchez Lucero
@ 2026-12-01 13:14 ` Bin Meng
0 siblings, 0 replies; 7+ messages in thread
From: Bin Meng @ 2026-12-01 13:14 UTC (permalink / raw)
To: Oscar Alejandro Sánchez Lucero
Cc: qemu-devel, Mark Cave-Ayland, qemu-ppc, Michael S. Tsirkin,
Paolo Bonzini
On Mon, Nov 30, 2026 at 10:34 PM Oscar Alejandro Sánchez Lucero
<aleszlucero@gmail.com> wrote:
>
> Replace the deprecated device_class_set_legacy_reset() with the
> Resettable interface by implementing the hold phase in
> adb_kbd_reset_hold().
>
> Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
> ---
> hw/input/adb-kbd.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Reviewed-by: Bin Meng <bin.meng@processmission.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] hw/input/adb-mouse: Convert to Resettable interface
2026-11-30 14:32 ` [PATCH 2/3] hw/input/adb-mouse: " Oscar Alejandro Sánchez Lucero
@ 2026-12-01 13:15 ` Bin Meng
0 siblings, 0 replies; 7+ messages in thread
From: Bin Meng @ 2026-12-01 13:15 UTC (permalink / raw)
To: Oscar Alejandro Sánchez Lucero
Cc: qemu-devel, Mark Cave-Ayland, qemu-ppc, Michael S. Tsirkin,
Paolo Bonzini
On Mon, Nov 30, 2026 at 10:34 PM Oscar Alejandro Sánchez Lucero
<aleszlucero@gmail.com> wrote:
>
> Replace the deprecated device_class_set_legacy_reset() with the
> Resettable interface by implementing the hold phase in
> adb_mouse_reset_hold().
>
> Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
> ---
> hw/input/adb-mouse.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Reviewed-by: Bin Meng <bin.meng@processmission.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] hw/input/pckbd: Convert to Resettable interface
2026-11-30 14:32 ` [PATCH 3/3] hw/input/pckbd: " Oscar Alejandro Sánchez Lucero
@ 2026-12-01 13:15 ` Bin Meng
0 siblings, 0 replies; 7+ messages in thread
From: Bin Meng @ 2026-12-01 13:15 UTC (permalink / raw)
To: Oscar Alejandro Sánchez Lucero
Cc: qemu-devel, Mark Cave-Ayland, qemu-ppc, Michael S. Tsirkin,
Paolo Bonzini
On Mon, Nov 30, 2026 at 10:34 PM Oscar Alejandro Sánchez Lucero
<aleszlucero@gmail.com> wrote:
>
> Replace the deprecated device_class_set_legacy_reset() with the
> Resettable interface by implementing the hold phase in
> i8042_mmio_reset_hold() and i8042_reset_hold().
>
> Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
> ---
> hw/input/pckbd.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
Reviewed-by: Bin Meng <bin.meng@processmission.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-12-01 13:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 14:32 [PATCH 0/3] hw/input: Convert remaining input devices to Resettable interface Oscar Alejandro Sánchez Lucero
2026-11-30 14:32 ` [PATCH 1/3] hw/input/adb-kbd: Convert " Oscar Alejandro Sánchez Lucero
2026-12-01 13:14 ` Bin Meng
2026-11-30 14:32 ` [PATCH 2/3] hw/input/adb-mouse: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:15 ` Bin Meng
2026-11-30 14:32 ` [PATCH 3/3] hw/input/pckbd: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:15 ` Bin Meng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.