From patchwork Mon Feb 4 23:18:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10796737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D16F14E1 for ; Mon, 4 Feb 2019 23:22:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 294D72C268 for ; Mon, 4 Feb 2019 23:22:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CA3D2C271; Mon, 4 Feb 2019 23:22:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AB9F22C268 for ; Mon, 4 Feb 2019 23:22:05 +0000 (UTC) Received: from localhost ([127.0.0.1]:50954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqnYy-0003S3-Ud for patchwork-qemu-devel@patchwork.kernel.org; Mon, 04 Feb 2019 18:22:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqnWp-0001Wv-BQ for qemu-devel@nongnu.org; Mon, 04 Feb 2019 18:19:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqnWo-0001DR-Bx for qemu-devel@nongnu.org; Mon, 04 Feb 2019 18:19:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52848) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqnWf-00013Z-LX; Mon, 04 Feb 2019 18:19:44 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1682C05001B; Mon, 4 Feb 2019 23:19:33 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-98.brq.redhat.com [10.40.204.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AA6C212A5D; Mon, 4 Feb 2019 23:19:12 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Date: Tue, 5 Feb 2019 00:18:10 +0100 Message-Id: <20190204231815.29661-7-philmd@redhat.com> In-Reply-To: <20190204231815.29661-1-philmd@redhat.com> References: <20190204231815.29661-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 04 Feb 2019 23:19:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 06/11] hw/devices: Move Gamepad declarations into a new header X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Jason Wang , Gerd Hoffmann , "Edgar E. Iglesias" , Rob Herring , Magnus Damm , Joel Stanley , Richard Henderson , Beniamino Galvani , qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?C=C3=A9dric_Le_Goater?= , David Gibson , Andrew Jeffery , Bastian Koppelmann , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Igor Mitsyanko , Michael Walle , qemu-ppc@nongnu.org, Jan Kiszka , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + hw/arm/stellaris.c | 2 +- hw/input/stellaris_input.c | 2 +- include/hw/devices.h | 3 --- include/hw/input/gamepad.h | 21 +++++++++++++++++++++ 5 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 include/hw/input/gamepad.h diff --git a/MAINTAINERS b/MAINTAINERS index daae4a3beb..a38086f767 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -729,6 +729,7 @@ M: Peter Maydell L: qemu-arm@nongnu.org S: Maintained F: hw/*/stellaris* +F: include/hw/input/gamepad.h Versatile Express M: Peter Maydell diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 442529cc65..24c20bf612 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -12,7 +12,6 @@ #include "hw/sysbus.h" #include "hw/ssi/ssi.h" #include "hw/arm/arm.h" -#include "hw/devices.h" #include "qemu/timer.h" #include "hw/i2c/i2c.h" #include "net/net.h" @@ -22,6 +21,7 @@ #include "sysemu/sysemu.h" #include "hw/arm/armv7m.h" #include "hw/char/pl011.h" +#include "hw/input/gamepad.h" #include "hw/misc/unimp.h" #include "cpu.h" diff --git a/hw/input/stellaris_input.c b/hw/input/stellaris_input.c index 99168bfeef..20c87d86f4 100644 --- a/hw/input/stellaris_input.c +++ b/hw/input/stellaris_input.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/devices.h" +#include "hw/input/gamepad.h" #include "ui/console.h" typedef struct { diff --git a/include/hw/devices.h b/include/hw/devices.h index e400f9eac0..7a630da47f 100644 --- a/include/hw/devices.h +++ b/include/hw/devices.h @@ -26,7 +26,4 @@ void *tsc2005_init(qemu_irq pintdav); uint32_t tsc2005_txrx(void *opaque, uint32_t value, int len); void tsc2005_set_transform(void *opaque, MouseTransformInfo *info); -/* stellaris_input.c */ -void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode); - #endif diff --git a/include/hw/input/gamepad.h b/include/hw/input/gamepad.h new file mode 100644 index 0000000000..112bad5e4c --- /dev/null +++ b/include/hw/input/gamepad.h @@ -0,0 +1,21 @@ +/* + * Gamepad style buttons connected to IRQ/GPIO lines + * + * Copyright (c) 2007 CodeSourcery. + * Written by Paul Brook + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef HW_INPUT_GAMEPAD_H +#define HW_INPUT_GAMEPAD_H + +/* Gamepad devices that have nowhere better to go. */ + +#include "hw/irq.h" + +/* stellaris_input.c */ +void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode); + +#endif