From patchwork Wed Nov 9 17:00:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 622939 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp380168pvb; Wed, 9 Nov 2022 09:02:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf5q2X59SidJN6H8jiYc/aQOuikCQFM6FbktQP4d+RNs1/a9S5KI+VV07aQ1fo4K2jNHPxa2 X-Received: by 2002:a05:620a:2087:b0:6fa:ece6:7cc8 with SMTP id e7-20020a05620a208700b006faece67cc8mr10138656qka.616.1668013321082; Wed, 09 Nov 2022 09:02:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668013321; cv=none; d=google.com; s=arc-20160816; b=rzumUO6K4M6X7uFx2is3YO4UL5cKxIdMTfMlUB9ZfbDp9S9Jy8vhsNqIgee9RgR11n EVswoRGmYdBdg9farOmY6+rNJY4gaIq6HKC4aTETcOQGCqYPLqcjKAd3qryG+UV7Vp5a bf1do4L1HH3CjHS/yBqTDimsVo1/VKhjTk4Eh5bcIzyAkMDi19sZ5u/mwlAEM9bsZTAq Sm4HoMba5JKmadJ/PtoRAN2mQXr6s1ISG2STQxbxAU1rlNSZGrFyf/rD/znaEyOaGYO5 Y2N4ql61nAqGZY2QAcUBh6K97rMR+SPdgwsSZvubKf9KLLvs6stapQK0GjnCfnXUcWR5 TMNQ== 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:cc:to:from:dkim-signature; bh=V5aTWKgcN43+Gn8Ya/Jicxm7hCiOiDyKLSwHBQnrTgs=; b=yy461/rP3vX1sLxqzTi0bJmaIX53kDDD/9MBVFI3JAaOH4hrHIZPemVDecJPyzRE4H 4yLUxbBhDtC5L5Uttp/5GPTHoelumQhZlQjXHaJ++Qso179nwNT3ivMVBQq71wTX/Q3v UcebNraetTF1fDvcM8h1mQ0cKnCw2oR2MOwelzmALB/4enSv89HWkTXASTYLjumLR8kg c8XqLXCAUlwIvOkiaTqj29vIgRKF92R2aNkU9ZYNdbaPDy1VK+gfc5pp8axFOUkjtp90 VZz+KZfFq1COI4oMP2gFlzgJ1/YR6F1ox7hOnybpMhDY+Ugxnm0nUclSjaPJHrFAYrYe 0Zsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j7iYK6jb; 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 i8-20020ac87648000000b003a51f2c11d2si7909443qtr.708.2022.11.09.09.02.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Nov 2022 09:02:01 -0800 (PST) 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=j7iYK6jb; 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 1osoRp-00041E-Rn; Wed, 09 Nov 2022 12:01:10 -0500 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 1osoQx-0003mq-Jj for qemu-devel@nongnu.org; Wed, 09 Nov 2022 12:00:15 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osoQv-00019P-JZ for qemu-devel@nongnu.org; Wed, 09 Nov 2022 12:00:15 -0500 Received: by mail-wm1-x32d.google.com with SMTP id j5-20020a05600c410500b003cfa9c0ea76so1724299wmi.3 for ; Wed, 09 Nov 2022 09:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=V5aTWKgcN43+Gn8Ya/Jicxm7hCiOiDyKLSwHBQnrTgs=; b=j7iYK6jbkxxgBEaK9hwd7ZWm526D6cDxC7OiDAnuMvPvKZgHGFCIVkAW7le7Pkb5HW WekmEF0pDyhc9eifFJyQvY25oI2dqiLEfII8jiilBs+jDFTs8K36WXhv5/q6Aou9/Z0b q3ySFQFXkXy00Pf+8jZ9JR7zsJjqecrdVC2opwU+oGGOgmVk6iyz6PEZFim39oPPtvPu 5LVRimAiGp3VyhzRhnw/8kjvKJnnsx3KAQ2cGHWkr9G7jZdkqDz0pIYCxGd3dJiIb/VX bQoNBuV04xUW7B7DVT5biFhGDvQM0vPm3bm+ynyRpjajH1u5bC/VkJePVrWNio87A2lG WDog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=V5aTWKgcN43+Gn8Ya/Jicxm7hCiOiDyKLSwHBQnrTgs=; b=h6M5hBA+4if8QuuFK6bmT9tvCvHzDxQ7kzGML+m5P2oMtEdgvH2mFOuPn/rcYDMIQo WQ55lL9CQIjsDJ5/TWnfBfJoM2V8ISfWUgIW/Zzgm112ENH0Rr0JeVvbn9VWzoO/ALtu 3402YgV1G3VwZGBZkga2DKf/fo49xr3agb+FAsMhG031QxD302N4L1twDe9H3vycRFfn /u4koxivRC5JLrahCwnVqOQ75wRvAAotONwz2Oc62kcDMyh3ne7+jH1xisHgulTvxPYq mSLFAh9ZESi1c6CWH7GAhcLSFNSTuxwPyHoHI9OhJUTYMUq8TRC+R5DxUtAEJC4bAtc0 +NBw== X-Gm-Message-State: ANoB5pnaUCQhQS+4bFW+K/PAIEQ8NTYidQGyVeQXOC+KxixnV57Ix5BL rbl08wMT5PpV1lZceW49fT7D4nFDSEl+kQ== X-Received: by 2002:a05:600c:4e92:b0:3cf:a6d9:7b03 with SMTP id f18-20020a05600c4e9200b003cfa6d97b03mr13111624wmq.205.1668013211487; Wed, 09 Nov 2022 09:00:11 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id p5-20020a05600c358500b003c6b9749505sm2514932wmq.30.2022.11.09.09.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 09:00:10 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PATCH for-8.0 0/2] hw/input/ps2: Convert to 3-phase reset Date: Wed, 9 Nov 2022 17:00:07 +0000 Message-Id: <20221109170009.3498451-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.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=ham 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 This patchset converts the ps2 keyboard and mouse devices to 3-phase reset. The rationale here is that it would be nice to get rid of the device_class_set_parent_reset() function, which is used by legacy-reset subclasses which want to chain to their parent's reset function. There aren't very many of these devices in total, and if we convert them all to 3-phase reset they can use the 3-phase-reset equivalent (resettable_class_set_parent_phases()). Eventually this will then let us simplify the transitional code for handling old-style device reset. This is one of a number of patchsets to do this that I'm planning to write and send out over the next few weeks. It's all 8.0 material. thanks -- PMM Peter Maydell (2): hw/input/ps2: Convert TYPE_PS2_DEVICE to 3-phase reset hw/input/ps2.c: Convert TYPE_PS2_{KBD,MOUSE}_DEVICE to 3-phase reset include/hw/input/ps2.h | 2 +- hw/input/ps2.c | 45 +++++++++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 15 deletions(-)