[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/5] hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' para
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 4/5] hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter |
Date: |
Sat, 18 Dec 2021 14:04:36 +0100 |
@pin is an input where we connect a device output.
Rename it @input_pin to simplify the documentation.
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/qdev-core.h | 6 +++---
hw/core/gpio.c | 13 +++++++------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 424c48daf6e..d19c9417520 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -476,7 +476,7 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const
char *name, int n);
* qdev_connect_gpio_out: Connect one of a device's anonymous output GPIO lines
* @dev: Device whose GPIO to connect
* @n: Number of the anonymous output GPIO line (which must be in range)
- * @pin: qemu_irq to connect the output line to
+ * @input_pin: qemu_irq to connect the output line to
*
* This function connects an anonymous output GPIO line on a device
* up to an arbitrary qemu_irq, so that when the device asserts that
@@ -509,7 +509,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n,
qemu_irq pin);
* @dev: Device whose GPIO to connect
* @name: Name of the output GPIO array
* @n: Number of the anonymous output GPIO line (which must be in range)
- * @pin: qemu_irq to connect the output line to
+ * @input_pin: qemu_irq to connect the output line to
*
* This function connects an anonymous output GPIO line on a device
* up to an arbitrary qemu_irq, so that when the device asserts that
@@ -530,7 +530,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n,
qemu_irq pin);
* For anonymous output GPIO lines, use qdev_connect_gpio_out().
*/
void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n,
- qemu_irq pin);
+ qemu_irq input_pin);
/**
* qdev_get_gpio_out_connector: Get the qemu_irq connected to an output GPIO
diff --git a/hw/core/gpio.c b/hw/core/gpio.c
index 8e6b4f5edf3..80d07a6ec99 100644
--- a/hw/core/gpio.c
+++ b/hw/core/gpio.c
@@ -115,17 +115,18 @@ qemu_irq qdev_get_gpio_in(DeviceState *dev, int n)
}
void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n,
- qemu_irq pin)
+ qemu_irq input_pin)
{
char *propname = g_strdup_printf("%s[%d]",
name ? name : "unnamed-gpio-out", n);
- if (pin && !OBJECT(pin)->parent) {
+ if (input_pin && !OBJECT(input_pin)->parent) {
/* We need a name for object_property_set_link to work */
object_property_add_child(container_get(qdev_get_machine(),
"/unattached"),
- "non-qdev-gpio[*]", OBJECT(pin));
+ "non-qdev-gpio[*]", OBJECT(input_pin));
}
- object_property_set_link(OBJECT(dev), propname, OBJECT(pin), &error_abort);
+ object_property_set_link(OBJECT(dev), propname,
+ OBJECT(input_pin), &error_abort);
g_free(propname);
}
@@ -165,9 +166,9 @@ qemu_irq qdev_intercept_gpio_out(DeviceState *dev, qemu_irq
icpt,
return disconnected;
}
-void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq pin)
+void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq input_pin)
{
- qdev_connect_gpio_out_named(dev, NULL, n, pin);
+ qdev_connect_gpio_out_named(dev, NULL, n, input_pin);
}
void qdev_pass_gpios(DeviceState *dev, DeviceState *container,
--
2.33.1
- [PATCH v2 0/5] hw/qdev: Clarify qdev_connect_gpio_out() documentation, Philippe Mathieu-Daudé, 2021/12/18
- [PATCH v2 2/5] hw/qdev: Correct qdev_init_gpio_out_named() documentation, Philippe Mathieu-Daudé, 2021/12/18
- [PATCH v2 4/5] hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter,
Philippe Mathieu-Daudé <=
- [PATCH v2 1/5] hw/qdev: Cosmetic around documentation, Philippe Mathieu-Daudé, 2021/12/18
- [PATCH v2 3/5] hw/qdev: Correct qdev_connect_gpio_out_named() documentation, Philippe Mathieu-Daudé, 2021/12/18
- [PATCH v2 5/5] hw/input/pckbd: Open-code i8042_setup_a20_line() wrapper, Philippe Mathieu-Daudé, 2021/12/18
- Re: [PATCH v2 0/5] hw/qdev: Clarify qdev_connect_gpio_out() documentation, Philippe Mathieu-Daudé, 2021/12/23
- Re: [PATCH v2 0/5] hw/qdev: Clarify qdev_connect_gpio_out() documentation, Philippe Mathieu-Daudé, 2021/12/31