From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8Hkl-0000AJ-5Q for qemu-devel@nongnu.org; Wed, 11 Nov 2009 13:17:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8Hkg-0008UA-54 for qemu-devel@nongnu.org; Wed, 11 Nov 2009 13:17:10 -0500 Received: from [199.232.76.173] (port=52850 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8Hkf-0008Tx-VQ for qemu-devel@nongnu.org; Wed, 11 Nov 2009 13:17:06 -0500 Received: from mail-fx0-f222.google.com ([209.85.220.222]:47414) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8Hkf-0001NC-HE for qemu-devel@nongnu.org; Wed, 11 Nov 2009 13:17:05 -0500 Received: by fxm22 with SMTP id 22so1338283fxm.2 for ; Wed, 11 Nov 2009 10:17:03 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4AF828A8.50904@codemonkey.ws> References: <4AF828A8.50904@codemonkey.ws> Date: Wed, 11 Nov 2009 19:17:03 +0100 Message-ID: <5b31733c0911111017u7e80acfwde1fd9796af39b98@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] Add support for multiple simultaneously used keyboard devices. From: Filip Navara Content-Type: multipart/alternative; boundary=0015175cdc76fc57ca04781c6e14 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org --0015175cdc76fc57ca04781c6e14 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Nov 9, 2009 at 3:35 PM, Anthony Liguori wrote: > Filip Navara wrote: > >> The support for multiple keyboard devices is essential for emulating >> embedded boards where multiple input devices are present (eg. keypad and >> rotary encoder) which are implemented using separate QEMU devices. >> >> Signed-off-by: Filip Navara >> >> > > What boards would we actually expose multiple keyboards with? > The one that I was about to submit in the next weeks and which I sent patches for few months ago (search for AT91). It is a custom board with rotary encoder and matrix keyboard, quite a common configuration. The PXA controllers even have special "GPIO" pins for these two input devices. Moreover, we're not doing anything useful here. We're just repeating a > single keypress to multiple keyboards which seems rather hackish. > The embedded systems I target don't have keyboards in the traditional sense, they have some input devices connected to the GPIO controller. These input devices could be reduced keyboards (eg. like on the classic mobile phones), various kinds of buttons, rotary encoders and so on. Since no direct mapping exists for these input devices on PC, the easiest way to emulate the input is with real keyboard. What I am trying to accomplish is to allow these emulated devices each handle a distinct subset of the PC keys. The matrix keyboard emulation would capture the numbers and few other keys and ignore the rest. The rotary encoder would capture arrows and ignore the rest. Current QEMU emulations hack it by hard-coding all the real input devices into one emulated device, which is specific for the board and not reusable. My emulation is based on the QDEV model and the approach used in Paul Brooks machine description patches. Obviously I am open to suggestions on how to better handle this. Best regards, Filip Navara --0015175cdc76fc57ca04781c6e14 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Nov 9, 2009 at 3:35 PM, Anthony Liguori = <anthony@code= monkey.ws> wrote:
Filip Navara wrote:
The support for multiple keyboard devices is essential for emulating embedd= ed boards where multiple input devices are present (eg. keypad and rotary e= ncoder) which are implemented using separate QEMU devices.

Signed-off-by: Filip Navara <filip.navara@gmail.com>
=A0

What boards would we actually expose multiple keyboards with?

The one that I was about to submit in the next weeks= and which I sent patches for few months ago (search for AT91). It is a cus= tom board with rotary encoder and matrix keyboard, quite a common configura= tion. The PXA controllers even have special "GPIO" pins for these= two input devices.

Moreover, we're not doin= g anything useful here. =A0We're just repeating a single keypress to mu= ltiple keyboards which seems rather hackish.

The embedded systems I target don't ha= ve keyboards in the traditional sense, they have some input devices connect= ed to the GPIO controller. These input devices could be reduced keyboards (= eg. like on the classic mobile phones), various kinds of buttons, rotary en= coders and so on. Since no direct mapping exists for these input devices on= PC, the easiest way to emulate the input is with real keyboard.

What I am trying to accomplish is to allow these emulat= ed devices each handle a distinct subset of the PC keys. The matrix keyboar= d emulation would capture the numbers and few other keys and ignore the res= t. The rotary encoder would capture arrows and ignore the rest.

Current QEMU emulations hack it by hard-coding all the = real input devices into one emulated device, which is specific for the boar= d and not reusable. My emulation is based on the QDEV model and the approac= h used in Paul Brooks machine description patches.

Obviously I am open to suggestions on how to better han= dle this.

Best regards,
Filip Navara
--0015175cdc76fc57ca04781c6e14--