[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 25/40] lasips2: introduce LASIPS2PortDeviceClass for the LASIPS2_
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 25/40] lasips2: introduce LASIPS2PortDeviceClass for the LASIPS2_PORT device |
Date: |
Wed, 29 Jun 2022 13:40:11 +0100 |
This will soon be used to store the reference to the LASIPS2_PORT parent device
for LASIPS2_KBD_PORT and LASIPS2_MOUSE_PORT.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/input/lasips2.c | 2 ++
include/hw/input/lasips2.h | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
index 6b53153838..10494a2322 100644
--- a/hw/input/lasips2.c
+++ b/hw/input/lasips2.c
@@ -334,6 +334,8 @@ static const TypeInfo lasips2_port_info = {
.parent = TYPE_DEVICE,
.instance_init = lasips2_port_init,
.instance_size = sizeof(LASIPS2Port),
+ .class_init = lasips2_port_class_init,
+ .class_size = sizeof(LASIPS2PortDeviceClass),
.abstract = true,
};
diff --git a/include/hw/input/lasips2.h b/include/hw/input/lasips2.h
index a05f26cbd9..426aa1371f 100644
--- a/include/hw/input/lasips2.h
+++ b/include/hw/input/lasips2.h
@@ -26,7 +26,11 @@
#include "hw/input/ps2.h"
#define TYPE_LASIPS2_PORT "lasips2-port"
-OBJECT_DECLARE_SIMPLE_TYPE(LASIPS2Port, LASIPS2_PORT)
+OBJECT_DECLARE_TYPE(LASIPS2Port, LASIPS2PortDeviceClass, LASIPS2_PORT)
+
+struct LASIPS2PortDeviceClass {
+ DeviceClass parent;
+};
typedef struct LASIPS2State LASIPS2State;
--
2.30.2
- [PATCH 15/40] lasips2: change LASIPS2State dev pointer from void to PS2State, (continued)
- [PATCH 15/40] lasips2: change LASIPS2State dev pointer from void to PS2State, Mark Cave-Ayland, 2022/06/29
- [PATCH 10/40] pl050: don't use legacy ps2_kbd_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 16/40] lasips2: QOMify LASIPS2Port, Mark Cave-Ayland, 2022/06/29
- [PATCH 17/40] lasips2: introduce new LASIPS2_KBD_PORT QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 19/40] lasips2: move keyboard port initialisation to new lasips2_kbd_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 18/40] lasips2: introduce new LASIPS2_MOUSE_PORT QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 20/40] lasips2: move mouse port initialisation to new lasips2_mouse_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 21/40] lasips2: introduce lasips2_kbd_port_class_init() and lasips2_kbd_port_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 23/40] lasips2: rename LASIPS2Port irq field to birq, Mark Cave-Ayland, 2022/06/29
- [PATCH 22/40] lasips2: introduce lasips2_mouse_port_class_init() and lasips2_mouse_port_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 25/40] lasips2: introduce LASIPS2PortDeviceClass for the LASIPS2_PORT device,
Mark Cave-Ayland <=
- [PATCH 24/40] lasips2: introduce port IRQ and new lasips2_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 26/40] lasips2: add named input gpio to port for downstream PS2 device IRQ, Mark Cave-Ayland, 2022/06/29
- [PATCH 28/40] lasips2: switch to using port-based IRQs, Mark Cave-Ayland, 2022/06/29
- [PATCH 27/40] lasips2: add named input gpio to handle incoming port IRQs, Mark Cave-Ayland, 2022/06/29
- [PATCH 30/40] lasips2: standardise on lp name for LASIPS2Port variables, Mark Cave-Ayland, 2022/06/29
- [PATCH 29/40] lasips2: rename LASIPS2Port parent pointer to lasips2, Mark Cave-Ayland, 2022/06/29
- [PATCH 32/40] lasips2: don't use legacy ps2_kbd_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 31/40] lasips2: switch register memory region to DEVICE_BIG_ENDIAN, Mark Cave-Ayland, 2022/06/29
- [PATCH 35/40] pckbd: introduce new vmstate_kbd_mmio VMStateDescription for the I8042_MMIO device, Mark Cave-Ayland, 2022/06/29
- [PATCH 33/40] lasips2: don't use legacy ps2_mouse_init() function, Mark Cave-Ayland, 2022/06/29