From patchwork Mon Apr 29 17:00:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 163082 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp2167367ill; Mon, 29 Apr 2019 10:33:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvKhArTDg3CpK8Adg0jA1Tn7SLssgaOsJPd8nUNysaCkV2bZ+xpndUOHGIh+TqiTK8nuQl X-Received: by 2002:adf:e8c4:: with SMTP id k4mr2538791wrn.9.1556559228077; Mon, 29 Apr 2019 10:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556559228; cv=none; d=google.com; s=arc-20160816; b=soukj2khunvEesH5/f3NXWQEar3QddYv39Mn4jN7gRwNK4rEksGXeiZx0hYEBK1x30 GTFlU7VlZ3pHXdZj0Dq32X3FAtIUCG0tuTDsJF5o+xC5npB6MwPW9WOfN06KQI4zAMx5 QlpwLx+MgDi/GT3jtgUQHl4I3INmKpq4gRBbdid/k81+yXFQ+3Yho3nc6SIGMPgalro9 m2XTcVerlrA22kAlrzlTNuUYO6I+X+rRc3pUBs4PTNauBU/KGImMs45TJExmn0AYG1Tk D0D2kJpJbHPDd/bywJsmyN9LzSUsbOh5tq+zeuGrwL9eIYABdK9HNaMFlUFp/ZqROkXW /ykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=g5HKQFfTMD1ezkdR00l6pHrV/C/KHIBl0/6EieG5feg=; b=mU90+1vilihKlewHgTnGNZK7ToT1tJXqaJboUZA8Z+/K95b963hd+AtHzTUNkIciIt VWBkTfSqVlxYxcujP4Sfub7xh1G+5sj8tRB43ZD1ga4+nph4+lXWgxyak6WtnXhu6yqi lb3KcC3muK+93REveJksy9g74PdymqVyYSCpnW29GxMITF9tlbP0PMrBRZokNmsZG/ev I6F5JVUAxPNELrG5tiR3fCo1zRqZ1+1szvFn+ePmjKqs/ZIf+LSX0vOUVAL/1QTgDQNu Nh4T11KrRVqIauyQsKubeU4wnRvyfb+y9hr4olYyknvghM0bC0Tpv8cvjpKu2+JU7gpU 6J4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E2pam2AF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i198si87870wmg.162.2019.04.29.10.33.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 29 Apr 2019 10:33:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E2pam2AF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:32842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLA9z-0008AC-0s for patch@linaro.org; Mon, 29 Apr 2019 13:33:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hL9f0-00051m-MS for qemu-devel@nongnu.org; Mon, 29 Apr 2019 13:01:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hL9ew-0006q4-8L for qemu-devel@nongnu.org; Mon, 29 Apr 2019 13:01:44 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:37591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hL9eu-0006e7-38 for qemu-devel@nongnu.org; Mon, 29 Apr 2019 13:01:40 -0400 Received: by mail-wr1-x431.google.com with SMTP id r6so17129580wrm.4 for ; Mon, 29 Apr 2019 10:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=g5HKQFfTMD1ezkdR00l6pHrV/C/KHIBl0/6EieG5feg=; b=E2pam2AFxd1hSrxjVPjVoKpwarLSKlo1Gvi11W7XKTSwmD7s0KcC+T/+b+IBlXhfxY c8COn+TxJg8xSQYSOjvSHb3HTvIWo248CutcEqL37D/4C1ulVyilXyGM9Ia4MIl672QF JzH3Skh7mXBRJyC+6Q+Luuf4372GKssmedq0Xj+Vgj8ukDNMee5U9bbJX13rbDM/EMal 6IjoDItsO8KMmCnTkzl+ejvn53TFR/ILtqFwTBwayL6jYw0mb6az9/t0Aj/NQAtY5mym iWSPEMMDP3JUjSbkb0+teKkrWvM8YY9C+gBZclF9E3oPs4zvr+6WitWyr4Rl+3Blw4Lr SjJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g5HKQFfTMD1ezkdR00l6pHrV/C/KHIBl0/6EieG5feg=; b=pdxxsvgaXwZIHaZu/UhKimT0++GBt1VAX4TtvEW6O0Sw9Z/Q+3lw425klF3TnynpmD XRqF5upRc64ZZTBqpZhu0MhoI67OTqFgVQlDIEqeXW4ZBxhvaYN7fAWamT1MQfHR6El2 vqbowN5BfYpfzRJ1e94KPCij+0Va61NFGKmcAzpwyd8uz9s6rmiykdj8DfSRfQDeBhNk 9KDoQuxC2MUCN4HJyKO6zCM69cfzGNxZvWNr2yu1jRnrA+FtXzTsJeBqgRUXtq6MsnNa mZXTCALez8Xr8Y5BLO3mRLza4KWH9sJcYpSuhrra+vW0iUqD3U4b/eR0Ei2NgZVyjafi 37Mw== X-Gm-Message-State: APjAAAWgLWWNg0TscLMNqagmJXyHGKhqnf2HJG73nBT18OZYbyn+gMN9 C6coFcWuRuoHZbOymMPWkj5PtCCLTII= X-Received: by 2002:a5d:4308:: with SMTP id h8mr30659199wrq.22.1556557280138; Mon, 29 Apr 2019 10:01:20 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id a13sm36896wmj.39.2019.04.29.10.01.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 10:01:19 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 29 Apr 2019 18:00:25 +0100 Message-Id: <20190429170030.11323-38-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190429170030.11323-1-peter.maydell@linaro.org> References: <20190429170030.11323-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 Subject: [Qemu-devel] [PULL 37/42] 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé Message-id: 20190412165416.7977-8-philmd@redhat.com Signed-off-by: Peter Maydell --- include/hw/devices.h | 3 --- include/hw/input/gamepad.h | 19 +++++++++++++++++++ hw/arm/stellaris.c | 2 +- hw/input/stellaris_input.c | 2 +- MAINTAINERS | 1 + 5 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 include/hw/input/gamepad.h -- 2.20.1 diff --git a/include/hw/devices.h b/include/hw/devices.h index e400f9eac09..7a630da47f7 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 00000000000..e20211baef8 --- /dev/null +++ b/include/hw/input/gamepad.h @@ -0,0 +1,19 @@ +/* + * 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 + +#include "hw/irq.h" + +/* stellaris_input.c */ +void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode); + +#endif diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 05f86749f40..5059aedbaa2 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/watchdog/cmsdk-apb-watchdog.h" #include "hw/misc/unimp.h" #include "cpu.h" diff --git a/hw/input/stellaris_input.c b/hw/input/stellaris_input.c index 99168bfeef1..20c87d86f40 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/MAINTAINERS b/MAINTAINERS index 4e6fd82c664..39a3216e1c4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -744,6 +744,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