qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: BALATON Zoltan <balaton@eik.bme.hu>
Subject: Re: [PATCH] include/hw/qdev-core.h: Correct and clarify gpio doc comments
Date: Fri, 12 Jul 2024 18:32:11 +0200	[thread overview]
Message-ID: <939a96a0-c49a-42b8-a050-fec93ee934f4@linaro.org> (raw)
In-Reply-To: <20240708153312.3109380-1-peter.maydell@linaro.org>

On 8/7/24 17:33, Peter Maydell wrote:
> The doc comments for the functions for named GPIO inputs and
> outputs had a couple of problems:
>   * some copy-and-paste errors meant the qdev_connect_gpio_out_named()
>     doc comment had references to input GPIOs that should be to
>     output GPIOs
>   * it wasn't very clear that named GPIOs are arrays and so the
>     connect functions specify a single GPIO line by giving both
>     the name of the array and the index within that array
> 
> Fix the copy-and-paste errors and slightly expand the text
> to say that functions are connecting one line in a named GPIO
> array, not a single named GPIO line.
> 
> Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Does this help? I wrote the text and know what the functions do
> to start with so it's a bit tricky for me to see where the docs
> don't state things as clearly as they ought to do...
> ---
>   include/hw/qdev-core.h | 17 +++++++++--------
>   1 file changed, 9 insertions(+), 8 deletions(-)


> - * This function connects an anonymous output GPIO line on a device
> - * up to an arbitrary qemu_irq, so that when the device asserts that
> - * output GPIO line, the qemu_irq's callback is invoked.
> + * This function connects a single GPIO output in a named array of output
> + * GPIO lines on a device up to an arbitrary qemu_irq, so that when the
> + * device asserts that output GPIO line, the qemu_irq's callback is invoked.
>    * The @name string must correspond to an output GPIO array which exists on
>    * the device, and the index @n of the GPIO line must be valid (i.e.
> - * be at least 0 and less than the total number of input GPIOs in that
> + * be at least 0 and less than the total number of output GPIOs in that

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

And queued, thanks!


      parent reply	other threads:[~2024-07-12 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08 15:33 [PATCH] include/hw/qdev-core.h: Correct and clarify gpio doc comments Peter Maydell
2024-07-08 18:52 ` BALATON Zoltan
2024-07-12 16:32 ` Philippe Mathieu-Daudé [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=939a96a0-c49a-42b8-a050-fec93ee934f4@linaro.org \
    --to=philmd@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).