qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/6] hw/input/stellaris_input: Convert to qdev


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 5/6] hw/input/stellaris_input: Convert to qdev
Date: Tue, 17 Oct 2023 14:48:17 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 17/10/23 14:23, Peter Maydell wrote:
Convert the hw/input/stellaris_input device to qdev.

The interface uses an array property for the board to specify the
keycodes to use, so the s->keycodes memory is now allocated by the
array-property machinery.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  include/hw/input/stellaris_gamepad.h | 25 +++++++++-
  hw/arm/stellaris.c                   | 26 +++++++---
  hw/input/stellaris_gamepad.c         | 73 +++++++++++++++++++---------
  3 files changed, 92 insertions(+), 32 deletions(-)


+#define TYPE_STELLARIS_GAMEPAD "stellaris-gamepad"
+OBJECT_DECLARE_SIMPLE_TYPE(StellarisGamepad, STELLARIS_GAMEPAD)
+
+struct StellarisGamepad {
+    /*< private >*/

Since commit 067109a11c ("docs/devel: mention the spacing requirement
for QOM") we don't use these private/public comments anymore.

Otherwise,
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

+    SysBusDevice parent_obj;
+
+    /*< public >*/
+    uint32_t num_buttons;
+    qemu_irq *irqs;
+    uint32_t *keycodes;
+    uint8_t *pressed;
+    int extension;
+};




reply via email to

[Prev in Thread] Current Thread [Next in Thread]