[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/13] tests/qtest/libqos: Reuse TYPE_IMX_I2C define
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 10/13] tests/qtest/libqos: Reuse TYPE_IMX_I2C define |
Date: |
Sat, 11 Jan 2025 19:37:08 +0100 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
tests/qtest/libqos/arm-imx25-pdk-machine.c | 5 +++--
tests/qtest/libqos/i2c-imx.c | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/qtest/libqos/arm-imx25-pdk-machine.c
b/tests/qtest/libqos/arm-imx25-pdk-machine.c
index 8fe128fae8..2d8b754343 100644
--- a/tests/qtest/libqos/arm-imx25-pdk-machine.c
+++ b/tests/qtest/libqos/arm-imx25-pdk-machine.c
@@ -23,6 +23,7 @@
#include "libqos-malloc.h"
#include "qgraph.h"
#include "i2c.h"
+#include "hw/i2c/imx_i2c.h"
#define ARM_PAGE_SIZE 4096
#define IMX25_PDK_RAM_START 0x80000000
@@ -50,7 +51,7 @@ static void *imx25_pdk_get_driver(void *object, const char
*interface)
static QOSGraphObject *imx25_pdk_get_device(void *obj, const char *device)
{
QIMX25PDKMachine *machine = obj;
- if (!g_strcmp0(device, "imx.i2c")) {
+ if (!g_strcmp0(device, TYPE_IMX_I2C)) {
return &machine->i2c_1.obj;
}
@@ -86,7 +87,7 @@ static void imx25_pdk_register_nodes(void)
.extra_device_opts = "bus=i2c-bus.0"
};
qos_node_create_machine("arm/imx25-pdk", qos_create_machine_arm_imx25_pdk);
- qos_node_contains("arm/imx25-pdk", "imx.i2c", &edge, NULL);
+ qos_node_contains("arm/imx25-pdk", TYPE_IMX_I2C, &edge, NULL);
}
libqos_init(imx25_pdk_register_nodes);
diff --git a/tests/qtest/libqos/i2c-imx.c b/tests/qtest/libqos/i2c-imx.c
index 710cb926d6..6d868e4cc4 100644
--- a/tests/qtest/libqos/i2c-imx.c
+++ b/tests/qtest/libqos/i2c-imx.c
@@ -209,8 +209,8 @@ void imx_i2c_init(IMXI2C *s, QTestState *qts, uint64_t addr)
static void imx_i2c_register_nodes(void)
{
- qos_node_create_driver("imx.i2c", NULL);
- qos_node_produces("imx.i2c", "i2c-bus");
+ qos_node_create_driver(TYPE_IMX_I2C, NULL);
+ qos_node_produces(TYPE_IMX_I2C, "i2c-bus");
}
libqos_init(imx_i2c_register_nodes);
--
2.48.0
- [PATCH v2 00/13] i.MX and SDHCI improvements, Bernhard Beschow, 2025/01/11
- [PATCH v2 02/13] hw/char/imx_serial: Fix reset value of UFCR register, Bernhard Beschow, 2025/01/11
- [PATCH v2 01/13] hw/sd/sdhci: Set SDHC_NIS_DMA bit when appropriate, Bernhard Beschow, 2025/01/11
- [PATCH v2 03/13] hw/char/imx_serial: Update all state before restarting ageing timer, Bernhard Beschow, 2025/01/11
- [PATCH v2 04/13] hw/pci-host/designware: Expose MSI IRQ, Bernhard Beschow, 2025/01/11
- [PATCH v2 06/13] hw/sd/sd: Remove legacy sd_set_cb() in favor of GPIOs, Bernhard Beschow, 2025/01/11
- [PATCH v2 05/13] hw/gpio/imx_gpio: Don't clear input GPIO values upon reset, Bernhard Beschow, 2025/01/11
- [PATCH v2 07/13] hw/sd/sd: Allow for inverting polarities of presence and write-protect GPIOs, Bernhard Beschow, 2025/01/11
- [PATCH v2 08/13] hw/char/imx_serial: Turn some DPRINTF() statements into trace events, Bernhard Beschow, 2025/01/11
- [PATCH v2 09/13] hw/timer/imx_gpt: Remove unused define, Bernhard Beschow, 2025/01/11
- [PATCH v2 10/13] tests/qtest/libqos: Reuse TYPE_IMX_I2C define,
Bernhard Beschow <=
- [PATCH v2 11/13] hw/i2c/imx_i2c: Convert DPRINTF() to trace events, Bernhard Beschow, 2025/01/11
- [PATCH v2 12/13] hw/misc/imx6_src: Convert DPRINTF() to trace events, Bernhard Beschow, 2025/01/11
- [PATCH v2 13/13] hw/gpio/imx_gpio: Turn DPRINTF() into trace events, Bernhard Beschow, 2025/01/11