From patchwork Tue Oct 17 12:22:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 734371 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp449068wro; Tue, 17 Oct 2023 05:24:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqucEoZR1QsNKBwxT8so/9T+uduQG8zsZdLtNctAt0SWKarMA7hTY6DELK7Ud9FA8ZY8pF X-Received: by 2002:a05:622a:183:b0:419:52a9:9ffb with SMTP id s3-20020a05622a018300b0041952a99ffbmr2266171qtw.20.1697545489954; Tue, 17 Oct 2023 05:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697545489; cv=none; d=google.com; s=arc-20160816; b=ufv1R6YpBgLgyDFQ1kDunYEuClRlnY3jmB01AhXDpdheXK5uz2Bm17JQHwsZWMFJ/e TGk3LoUFjsloFu/KOx/1/29YoNyrqOoZmkwWmMGkIiHpqJ2Eer9KNGJQ/CWXcWCfVENb 8tOS3TOfrs2p7kBlBsxVS5rkqqMaG5QWqjbvhgHYNAwHysbIf9IIe96ptot/n8WBYJD2 0pdaQgEZkksYuofA1/TY9bxwKAI3ki57rUw4GCPQ7/P7mOxPnbJJTnzSd9blhA8YFf7t yEtSV8nZJINOzossg1x/ATXk7MpHAjxNHG+UHg1UK/pByZkVPjN+0284Q336OUEJ9w0S DDZw== 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:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=+5GRvZ43zFqRMd/YwXd7fMRHjvYLnlP+6/mhUjg5NqI=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=oOybucF+nPxvR9fYxExhTOjh1aCKVkZtRqQIpcWlxlUnKQW4EO7M/vcL6oBmF7WoF8 MDB87IfiwHwC+yxeAUrcppgiJp32PrrOf9MDgdnGzO11/huauduepqOz70Rpl0MtUSIf gNm32coElKG8/9HrHWZw8KA8vVqvbukOLeUiOf6lmj8gokKsh5sx78SVNh+FnMjZ0ECm WRe8x9qvVqXYBdmURhmFkImMEWOs/ScSCmF2KdEcawBanL34L8wSHEFKBa9ZaTt4A1+d MJPY2DLEDjmDa22cOLt/lvuPh52N0LXQpC57nkYAvv4rGuUmJD6YmGNHohvvq7F56bbJ Y9Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SzZ7SQLn; 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=pass (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 d14-20020ac85d8e000000b004120bff5c3csi972674qtx.236.2023.10.17.05.24.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Oct 2023 05:24:49 -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=pass header.i=@linaro.org header.s=google header.b=SzZ7SQLn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsj6P-0006ZG-2i; Tue, 17 Oct 2023 08:23:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsj6M-0006X7-85 for qemu-devel@nongnu.org; Tue, 17 Oct 2023 08:23:10 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsj6I-0003u9-SS for qemu-devel@nongnu.org; Tue, 17 Oct 2023 08:23:09 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3296b49c546so4524281f8f.3 for ; Tue, 17 Oct 2023 05:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697545384; x=1698150184; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=+5GRvZ43zFqRMd/YwXd7fMRHjvYLnlP+6/mhUjg5NqI=; b=SzZ7SQLnkvJF8DxZIDkbc9l0QOMAZPaku4Am/UoNrM0Cfl/zTIKFKTiRpJQd9c/k5C orXP59qcz0mjxDEEmmAj85EYbW6w1FHm5GBFggS6yHVEt5f6XfY9RYswMCpSqIWleI38 7f8DQ5kEDS9KFAecEEd9Qr8di7ZNYeMLuIkWofZsBa++OLaYRTvpgn6cU0s82uWEFau0 Cnv5lfwM7tGFVw5xUdApOroSw8KEXadPHkUrm8+xfeooqcOg/V7hfXcOSnjjPssfW1ly 3SfG/fPcYefcBx6nBwtEFEjgnf4PPw6WsN7Sx8jz0UKqQTjr3/Jvijx+AToRd8ymYyMW 4xJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697545384; x=1698150184; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+5GRvZ43zFqRMd/YwXd7fMRHjvYLnlP+6/mhUjg5NqI=; b=ChcNsVxq235W7Nk/I9I5U5RLgowHY50JdxbwBP9spEgrh7Z1psY8RUW41tINpDtjZY nuvZslCUxOAxGDvCtLh41cbEXVRzOTZGATXp8xuilPliqUNIPxehbdoCwy+tlGZDtzo2 AtAeBnu5X8VaAOS9k0dJz5zRf23CQNmDjMqHcbgSRNUdHc9uqi1tYcvWJbAshN1kl4ml UjnHtBwJ3+9l2cmrN7SoR65GPMFT+n588QsCtBdGBuBhatCQcJ/b5JEsMD4rNUfgafsd CJ51rkLMYLu5rjCIKvOW7tVh3NeJlSWrcK1hlD/0vBVoC49M9EJKo8Z9rRGlNCBEuJ64 AvdA== X-Gm-Message-State: AOJu0YxOtv6EEaZaw529mYSTfiPy4aTLwYUQXP36qv6hUhzCPPRnpWm4 QqlY1iE0f9XsCiF8DUEDW6OTIQ== X-Received: by 2002:adf:f4cf:0:b0:317:50b7:2ce3 with SMTP id h15-20020adff4cf000000b0031750b72ce3mr1975222wrp.51.1697545384207; Tue, 17 Oct 2023 05:23:04 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id w17-20020a5d4b51000000b0032da4c98ab2sm1590905wrs.35.2023.10.17.05.23.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:23:03 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 0/6] arm/stellaris: convert gamepad input device to qdev Date: Tue, 17 Oct 2023 13:22:56 +0100 Message-Id: <20231017122302.1692902-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+patch=linaro.org@nongnu.org (I had this all ready to go before I went off on holiday two weeks ago, except I forgot to actually *send* the emails...) This patchseries converts the stellaris board's gamepad input device to qdev. This isn't a very important bit of conversion (I was just looking for a small tail-end-of-the-week task), but it does reduce by one the number of users of a couple of legacy APIs: vmstate_register() and qemu_add_kbd_event_handler(). I've included Kevin's qdev_prop_set_array() patch here, because I wanted an array property and it doesn't seem sensible to write it the old way and have another thing that needs converting. I'm assuming that by the time this patchset gets reviewed and committed that one will already be upstream. thanks -- PMM Kevin Wolf (1): qdev: Add qdev_prop_set_array() Peter Maydell (5): hw/input/stellaris_input: Rename to stellaris_gamepad hw/input/stellaris_gamepad: Rename structs to our usual convention hw/input/stellaris_gamepad: Remove StellarisGamepadButton struct hw/input/stellaris_input: Convert to qdev hw/input/stellaris_gamepad: Convert to qemu_input_handler_register() include/hw/input/gamepad.h | 18 ----- include/hw/input/stellaris_gamepad.h | 39 ++++++++++ include/hw/qdev-properties.h | 3 + hw/arm/stellaris.c | 34 ++++++--- hw/core/qdev-properties.c | 21 ++++++ hw/input/stellaris_gamepad.c | 102 +++++++++++++++++++++++++++ hw/input/stellaris_input.c | 93 ------------------------ hw/arm/Kconfig | 2 +- hw/input/Kconfig | 2 +- hw/input/meson.build | 2 +- 10 files changed, 193 insertions(+), 123 deletions(-) delete mode 100644 include/hw/input/gamepad.h create mode 100644 include/hw/input/stellaris_gamepad.h create mode 100644 hw/input/stellaris_gamepad.c delete mode 100644 hw/input/stellaris_input.c Tested-by: Philippe Mathieu-Daudé