[Top][All Lists]

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigg

From: Shannon Zhao
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse
Date: Fri, 26 Feb 2016 22:54:10 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 2016/2/26 20:53, Peter Maydell wrote:
On 26 February 2016 at 12:31, Shannon Zhao <address@hidden> wrote:
So how about below patch? I've tested it and it works both for ACPI and
DT. Could you help verify if it works for you? Thanks.

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 15658f4..4d45ea2 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -558,11 +558,20 @@ static void create_rtc(const VirtBoardInfo *vbi,
qemu_irq *pic)

+#define GPIO_KEY_LATENCY 500 /* 500ms */

I don't understand why a 500ms pulse is better than a short one.

Oh, I just pick a value which seems like a real latency for pressing a button. What's your suggestion?

+static QEMUTimer *gpio_key_timer;

This is state, and must be migrated somehow.

Ah, yes. So is it fine if we move this timer and the notifier virt_system_powerdown_notifier to VirtMachineState?


reply via email to

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