qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org, hsp.cat7@gmail.com
Subject: Re: [PATCH v2] adb-mouse: convert to use QemuInputHandler
Date: Tue, 10 Sep 2024 21:36:09 +0100	[thread overview]
Message-ID: <5a28f05c-c90c-419e-9d23-8c3a3e6fcf72@ilande.co.uk> (raw)
In-Reply-To: <970cfa94-c8e8-4fa5-96a7-45b964e4bef3@linaro.org>

On 10/09/2024 15:48, Philippe Mathieu-Daudé wrote:

> Hi Mark,
> 
> On 7/9/24 19:37, Mark Cave-Ayland wrote:
>> Update the ADB mouse implementation to use QemuInputHandler instead of the
>> legacy qemu_add_mouse_event_handler() function.
>>
>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> ---
>>   hw/input/adb-mouse.c | 56 ++++++++++++++++++++++++++++++++++++--------
>>   1 file changed, 46 insertions(+), 10 deletions(-)
>>
>> v2:
>> - Rebase onto master
>>
>> - Replace (DeviceState *)s with dev in adb_mouse_realize() as suggested by
>>    Phil
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
>> +static const QemuInputHandler adb_mouse_handler = {
>> +    .name  = "QEMU ADB Mouse",
>> +    .mask  = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_REL,
>> +    .event = adb_mouse_handle_event,
>> +};
> 
> Do you mind if you amend your comment from v1 for clarity?
> I could squash the following and take in my next PR:
> 
> diff --git a/hw/input/adb-mouse.c b/hw/input/adb-mouse.c
> index c0e0282fee..15e6e91804 100644
> --- a/hw/input/adb-mouse.c
> +++ b/hw/input/adb-mouse.c
> @@ -97,6 +97,11 @@ static const QemuInputHandler adb_mouse_handler = {
>       .name  = "QEMU ADB Mouse",
>       .mask  = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_REL,
>       .event = adb_mouse_handle_event,
> +    /*
> +     * We do not need the .sync handler because unlike e.g. PS/2 where async
> +     * mouse events are sent over the serial port, an ADB mouse is constantly
> +     * polled by the host via the adb_mouse_poll() callback.
> +     */
>   };
> 
> Regards,
> 
> Phil.

Sure! If you think it is useful to an external set of eyes, then feel free to add it in.


ATB,

Mark.



  reply	other threads:[~2024-09-10 20:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07 17:37 [PATCH v2] adb-mouse: convert to use QemuInputHandler Mark Cave-Ayland
2024-09-10 14:48 ` Philippe Mathieu-Daudé
2024-09-10 20:36   ` Mark Cave-Ayland [this message]
2024-09-11  5:52     ` Philippe Mathieu-Daudé

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=5a28f05c-c90c-419e-9d23-8c3a3e6fcf72@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=hsp.cat7@gmail.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).