From nobody Fri Nov 14 19:42:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1761213908; cv=none; d=zohomail.com; s=zohoarc; b=Moczv/CiFz8ENDh+LR3hKQiiyYalAgUSdo2XXRkLwVumki5INujTaFw9tkqhmedLLzn8QE4/lR5DsJDArNP74wioR4SXMYaPfeFKARQ/M15WbJYCRpxB/ltnVY/u1IGntRT01WcOPEAoFfnif6hvtu+KX4Q39aHTtqcyqCQy71A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761213908; h=Content-Type: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:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=re/IFDJTQ7udGpqTATqiwbQrKBAODHJp1dC6hMB41/Q=; b=CKkRyQ2E8dIwsmHuQBEsLn93JE6gjVLTv54yd3ocuZO6tBk91iUWolGTjzrBXhexgwWFgWN/NwaNQ+mWdLzESR00OgHaybxv8Ss/Jxm/Ww8xS0+4l9sTHAlh0QzxfnLyWNcUCuNVUAG/nYcELcgsHCt2cFDe3WGiYekYzPAacAo= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1761213908220493.27931381514577; Thu, 23 Oct 2025 03:05:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vBs9N-0001N2-Ew; Thu, 23 Oct 2025 06:02:29 -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 1vBs96-0001HO-Pq; Thu, 23 Oct 2025 06:02:12 -0400 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vBs94-00039r-Ss; Thu, 23 Oct 2025 06:02:12 -0400 Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Thu, 23 Oct 2025 18:01:52 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Thu, 23 Oct 2025 18:01:52 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:ASPEED BMCs" , "open list:All patches CC here" CC: , , Subject: [PATCH v1 03/13] hw/arm/aspeed: Make create_pca9552() globally accessible for reuse Date: Thu, 23 Oct 2025 18:01:36 +0800 Message-ID: <20251023100150.295370-4-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023100150.295370-1-jamin_lin@aspeedtech.com> References: <20251023100150.295370-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=211.20.114.72; envelope-from=jamin_lin@aspeedtech.com; helo=TWMBX01.aspeed.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_FAIL=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: , Reply-to: Jamin Lin From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1761213909541154100 The helper function create_pca9552() is now made globally visible so it can be reused by different Aspeed machine source files. Previously, the function was declared static, limiting its scope to aspeed.c. Since multiple Aspeed machine implementations will require I=C2=B2C device initialization using PCA9552 GPIO expanders, this function has been promoted to global visibility. This change improves code sharing and reduces duplication across machine-specific initialization files. No functional changes. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed.h | 1 + hw/arm/aspeed.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h index 7743ad2fb0..d4d63996a6 100644 --- a/include/hw/arm/aspeed.h +++ b/include/hw/arm/aspeed.h @@ -60,5 +60,6 @@ struct AspeedMachineClass { }; =20 void aspeed_machine_class_init_cpus_defaults(MachineClass *mc); +void create_pca9552(AspeedSoCState *soc, int bus_id, int addr); =20 #endif diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 5da21a4d6a..2695f0c11b 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -536,7 +536,7 @@ static void tiogapass_bmc_i2c_init(AspeedMachineState *= bmc) i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 6), "tmp421", 0x= 4e); } =20 -static void create_pca9552(AspeedSoCState *soc, int bus_id, int addr) +void create_pca9552(AspeedSoCState *soc, int bus_id, int addr) { i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, bus_id), TYPE_PCA9552, addr); --=20 2.43.0