From nobody Sat Nov 15 23:37:24 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1746124552; cv=none; d=zohomail.com; s=zohoarc; b=KtY2gRAi+bWb/qV2t2IjjHuNop8rhsW0CIMo+qsYs5yprmB3bOLAGk8YLF9B5b5Vtiah9sFVE8j1jGh946D1xmBWyOipYTehEAkKmNjR7jXx+0Pqs+eF7r38PTwk4iiMyNLgTf9a2sRchCYC3ytlG4phJEx69LAQwY/nEOFcmPc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1746124552; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RqUBQMIDvrWdaGrAbnq5K23B7hGYiXftBrPor930Aiw=; b=VJJ/Od8U7K+0Ho65lt/ZgIY5oF6w4MOFs69VH1Jd6iNvfuq1yDBg6Mwl2/FbatxA/uL0xhOdxO2ZurEK2NqNbzyILHMkDB8H9i442maCGB6mMSBHDiiv3b8JdpuNunmzKUEtdqguNySeLU09FhWrIDgoYx+d58tqueTMJOzi0P4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1746124552850366.7311434136335; Thu, 1 May 2025 11:35:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAYkU-0004xO-55; Thu, 01 May 2025 14:35:06 -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 1uAYkP-0004ui-VU; Thu, 01 May 2025 14:35:01 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAYkN-0007W0-QH; Thu, 01 May 2025 14:35:01 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5e5c7d6b96fso2220885a12.3; Thu, 01 May 2025 11:34:59 -0700 (PDT) Received: from localhost.localdomain (dynamic-2a02-3100-2980-eb00-0219-99ff-feb2-2458.310.pool.telefonica.de. [2a02:3100:2980:eb00:219:99ff:feb2:2458]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5f93000b272sm751709a12.68.2025.05.01.11.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 May 2025 11:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746124497; x=1746729297; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RqUBQMIDvrWdaGrAbnq5K23B7hGYiXftBrPor930Aiw=; b=LuYvAbicz8iX8UuSzYp9fKmPdcwc1o7QN2nK8wRTiCjOCA59tQfOJgeU7cXU963/3B NwGKV3u0iol60yK4GL9/h0bZQT4ZKZ/MLb8xTbKxDRNK8bzEiNmqDbvipibCsTNpQqtc sZj0QGFiv3D+t0+BNKmuPgaZprg7qBh0R/67AjwcYZ+0KIhjl5fWs2iNByszyHn6+MWb POhjaETgq+LhSFHnrfYLxsjfqU8p9W2vmKQ34PtmARZAz2HNUWCrLbpOBcw7CnRKqLVt oMlueYXGROZCPX3lXuMWYYEpshjyEJIF6qQ8v466mUH6Bi+ERESnChTEIpXdw5BcZ5Vk UDXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746124497; x=1746729297; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RqUBQMIDvrWdaGrAbnq5K23B7hGYiXftBrPor930Aiw=; b=pPmGnYrNrYchWY9bZnR5bqcMCALTe3YetRSdlAmPiEFZpF9CR9ZRZyIxLxByfUZwqC im0/L6yVvLPxfqyR+h2qKbEDTG5uOLug/z4ewwlabM/Pe5JipTpOm8BZ2k0ZffxIPVq/ Ubja/bomLJ7l0hK/xo0r5WtCGdF4RkVPSER0wQi4GXfUpLVhHy1eEOrUdS+UrBxoPyQd z+C+aDOaRHWHa95irIxVkQMpxySOu1j5iLuhSk+FrtuiiGEiHRnBElmg9OZ0EVuTPT76 lJwn1v+If9ktwFbjNcJRDC6hAxxHKE0uxEmSwkc6zn6fQmlRboWxN5t1KNhXbUCvHbRq WVZw== X-Forwarded-Encrypted: i=1; AJvYcCWCAmhnKLCIFVXeZX5lfZiCTPLo1CKSjgsLcOi9dKoVobsJZIoZbbrOkaXqHBmjK1Az96dmhCAahg==@nongnu.org X-Gm-Message-State: AOJu0YwbloDwPFSwl3aGtNK1Y/54T8OZI8FqMZ6lNMIZBbB6CKIgPdHM eNu9XIxIQrV6bl0g55HXXcYx5tTsZZyI62xwkXqpOhr0IXAueoManxGKrg== X-Gm-Gg: ASbGncs8tM7LXwAiE0zR7tekBoA6kp/UYltPixEoANGeFi/ayn+GkLwoWA6Ur5FUuM7 gFYp/BlUXa2eRM/dYykRJT0gzZM/hikPJsKNycOJjmxYhXdHwGCkQEli/pzb+pUvMZrkxpLChyQ wa/ZrgZT5pm2rEGikDL7fg9QSYzvxWc6JiKRpj2i4oGNxWbbQ7aORX8FQm7kesIXso6uMQPvOjh eqy/REwgMPHmx+0f2yXPS73GHt2zxtqdvCTeNx8tIeAoXMLry9SPS/rKJzwejL6XnVGq3JGehtn zT2f3ioo0elAp3L5DLE81U2wmDHjP5Uzhx2LAr9tQYOgx5quWZyc57vpglLnceSua6I3e++Ci3U u5vfe5oCrgtph6ZzZ5+bai2nQrz4tgg29HV/+hHVZNFTF+rus7hIIcU9DJ+3HgQ== X-Google-Smtp-Source: AGHT+IF6luuiAmX/di/fru9iCSnBFuHBGw4XpbeWQWJCKLyNDt+ct5hz4TlaiFO3IkhNcl8wBY5/zQ== X-Received: by 2002:a05:6402:2753:b0:5ec:cd52:27c9 with SMTP id 4fb4d7f45d1cf-5f91944d7demr2773168a12.31.1746124497327; Thu, 01 May 2025 11:34:57 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, Andrey Smirnov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow Subject: [PATCH 3/3] hw/gpio/imx_gpio: Fix interpretation of GDIR polarity Date: Thu, 1 May 2025 20:34:45 +0200 Message-ID: <20250501183445.2389-4-shentey@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250501183445.2389-1-shentey@gmail.com> References: <20250501183445.2389-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=shentey@gmail.com; helo=mail-ed1-x536.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, FREEMAIL_FROM=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1746124554077019100 Content-Type: text/plain; charset="utf-8" According to the i.MX 8M Plus reference manual, a GPIO pin is configured as= an output when the corresponding bit in the GDIR register is set. The function imx_gpio_set_int_line() is intended to be a no-op if the pin is configured = as an output, returning early in such cases. However, it inverts the condition. F= ix this by returning early when the bit is set. Fixes: f44272809779 ("i.MX: Add GPIO device") cc: qemu-stable Signed-off-by: Bernhard Beschow --- hw/gpio/imx_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/gpio/imx_gpio.c b/hw/gpio/imx_gpio.c index f23c52af26..450ece4548 100644 --- a/hw/gpio/imx_gpio.c +++ b/hw/gpio/imx_gpio.c @@ -72,7 +72,7 @@ static void imx_gpio_update_int(IMXGPIOState *s) static void imx_gpio_set_int_line(IMXGPIOState *s, int line, IMXGPIOLevel = level) { /* if this signal isn't configured as an input signal, nothing to do */ - if (!extract32(s->gdir, line, 1)) { + if (extract32(s->gdir, line, 1)) { return; } =20 --=20 2.49.0