From nobody Mon Feb 9 04:30:01 2026 Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B80F032D0CC; Sat, 17 Jan 2026 11:17:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768648651; cv=none; b=OiwbsBZEeImMKxyDK5HOSD9eNkfsVWAN37KGQmeUMCJMiLAhBZXUa0sYTfSdCZdJ6+r2l84hhxYbOQIFl1o+JmmvR3NRSW8TApodUQYinPUirlPAbzaPkrCjRorFLhf9vhvO7k5hmQKjAG+0eNdTIh0oniAsm3zIlnMubosloaU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768648651; c=relaxed/simple; bh=fMFjNVfJUJK5VN+Q6Q9ptUJYcET4fbirvqq7Y5jOHoc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=QM7l7AdZiLopmeN8z6LC16XvhDQs89VDazxrxz9ifXSfFYTUcF6sA6bNcvbUvmS+EzQnZvY4ZOX9j1I02rs/LdQvo4dQtqZfib9qvGY/hsmIVGtrPSQwtDAuyS3ZsviAfZnSBIFTXajMwBp0tfCVyFBdNwTEcyd2idq1PAd5/fc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com 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; Sat, 17 Jan 2026 19:17:17 +0800 Received: from [127.0.1.1] (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Sat, 17 Jan 2026 19:17:17 +0800 From: Billy Tsai Date: Sat, 17 Jan 2026 19:17:08 +0800 Subject: [PATCH 1/5] gpio: aspeed-sgpio: Change the macro to support deferred probe Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260117-upstream_sgpio-v1-1-850ef3ffb680@aspeedtech.com> References: <20260117-upstream_sgpio-v1-0-850ef3ffb680@aspeedtech.com> In-Reply-To: <20260117-upstream_sgpio-v1-0-850ef3ffb680@aspeedtech.com> To: Linus Walleij , Bartosz Golaszewski , Joel Stanley , Andrew Jeffery , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , , "Andrew Jeffery" , , , Billy Tsai X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768648637; l=1688; i=billy_tsai@aspeedtech.com; s=20251118; h=from:subject:message-id; bh=fMFjNVfJUJK5VN+Q6Q9ptUJYcET4fbirvqq7Y5jOHoc=; b=9EIQUzfuyfySwb/EFm0C5bcEqwAY3UXvUjcFnygWmMjnJ9uNZVYEsKiAmq1MeqA0pabJ5y1C7 Sezf7nTpx/uBfCjf5VmGZshvDdXvfx21ty7qHiy4b3i4NzUtCqDRkjE X-Developer-Key: i=billy_tsai@aspeedtech.com; a=ed25519; pk=/A8qvgZ6CPfnwKgT6/+k+nvXOkN477MshEGJvVdzeeQ= Use module_platform_driver() to replace module_platform_driver_probe(). The former utilizes platform_driver_register(), which allows the driver to defer probing when it doesn't acquire the necessary resources due to probe order. In contrast, the latter uses __platform_driver_probe(), which includes the comment "Note that this is incompatible with deferred probing." Since our SGPIO driver requires access to the clock resource, the former is more suitable. Signed-off-by: Billy Tsai --- drivers/gpio/gpio-aspeed-sgpio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-aspeed-sgpio.c b/drivers/gpio/gpio-aspeed-sg= pio.c index 7622f9e9f54a..318cd0e39741 100644 --- a/drivers/gpio/gpio-aspeed-sgpio.c +++ b/drivers/gpio/gpio-aspeed-sgpio.c @@ -516,7 +516,7 @@ static const struct of_device_id aspeed_sgpio_of_table[= ] =3D { =20 MODULE_DEVICE_TABLE(of, aspeed_sgpio_of_table); =20 -static int __init aspeed_sgpio_probe(struct platform_device *pdev) +static int aspeed_sgpio_probe(struct platform_device *pdev) { u32 nr_gpios, sgpio_freq, sgpio_clk_div, gpio_cnt_regval, pin_mask; const struct aspeed_sgpio_pdata *pdata; @@ -611,11 +611,12 @@ static int __init aspeed_sgpio_probe(struct platform_= device *pdev) } =20 static struct platform_driver aspeed_sgpio_driver =3D { + .probe =3D aspeed_sgpio_probe, .driver =3D { .name =3D KBUILD_MODNAME, .of_match_table =3D aspeed_sgpio_of_table, }, }; =20 -module_platform_driver_probe(aspeed_sgpio_driver, aspeed_sgpio_probe); +module_platform_driver(aspeed_sgpio_driver); MODULE_DESCRIPTION("Aspeed Serial GPIO Driver"); --=20 2.34.1