From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lelvem-ot01.ext.ti.com (lelvem-ot01.ext.ti.com [198.47.23.234]) (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 EB99A3074B5 for ; Tue, 24 Jun 2025 18:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.234 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750790599; cv=none; b=BMkJZx8aMz45JKnbEX52GeYQORfY9GEdfJ9aIn9E9Vem+hsO5QOpY6YC0Qjg/VAQgjOjWGVt1HxklB4+Ue7F0hJCld2jXLW24thJuwBr9TdpMzlNFW7fmgqG9g6QUOZ491jUV9wcOOw1osgJGR7KU/obfaRcHTxHjE+Q7aXl3fY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750790599; c=relaxed/simple; bh=cU77tYeAJdnVrMFTAssZhAGd56A1kHptmmuN18KkZ6E=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mSVMf8Kpe6NhUMVIiR2OX8Em3ZZT1R6eI0vsF/yBpLFEuAHIU51DI8y6zmMglyAuqavCtgiAPki/fxEiN+igHpgGWy675AKdBTDxZAAMaefDdWgMJ9hBkHXKqnR7ZZp6269kJE3t69EjSWehHKA6peofBzbsDfTbdI7O/9x8D70= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=nAAHio8Z; arc=none smtp.client-ip=198.47.23.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="nAAHio8Z" Received: from lelvem-sh01.itg.ti.com ([10.180.77.71]) by lelvem-ot01.ext.ti.com (8.15.2/8.15.2) with ESMTP id 55OIglKf1238390; Tue, 24 Jun 2025 13:42:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1750790567; bh=d7RyoS9Xq2SqZl1k6ym5o4fjIiCYNNVYuTiU+w0N+C0=; h=From:To:CC:Subject:Date; b=nAAHio8ZNDbgN+CYEXlSX8ptbbLOIUV6HwBmawy1Tb5LqOjTZyTThqn9KBwzs0vJw 5Xit6sT2Nz66hLxFPPfb+0zrNEE5Pwz9STdGo0+4IXBT+JxmV2UAcMsLP6d6/nR5F2 7hCnBVlC1srj0C2ojrFRhd6buTHEga2/CVW9o7D4= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelvem-sh01.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 55OIgluT1799620 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Tue, 24 Jun 2025 13:42:47 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Tue, 24 Jun 2025 13:42:47 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Tue, 24 Jun 2025 13:42:46 -0500 Received: from lelvem-mr05.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 55OIgkxh1989825; Tue, 24 Jun 2025 13:42:46 -0500 From: Andrew Davis To: Arnd Bergmann , Andre Przywara , Russell King , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Alexey Charkov , Krzysztof Kozlowski , Stefano Stabellini CC: , , , , Andrew Davis Subject: [PATCH v6] ARM: Switch to new sys-off handler API Date: Tue, 24 Jun 2025 13:42:45 -0500 Message-ID: <20250624184245.343657-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis Reviewed-by: Andre Przywara Acked-by: Alexey Charkov --- Changes for v6: - Rebased on v6.16-rc3 - Squashed series and sent to soc@lists.linux.dev as suggested by Arnd Changes for v5: - Rebase on v6.15-rc1 Changes for v4: - Drop already taken patches - Rebase on latest master Changes for v3: - Rebase on v6.12-rc1 Changes for v2: - Collect Reviewed/Acked-bys - Rebase on v6.11-rc1 arch/arm/mach-highbank/highbank.c | 2 +- arch/arm/mach-pxa/spitz.c | 2 +- arch/arm/mach-sa1100/generic.c | 2 +- arch/arm/mach-vt8500/vt8500.c | 2 +- arch/arm/xen/enlighten.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 5d4f977ac7d2a..47335c7dadf8d 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -143,7 +143,7 @@ static void __init highbank_init(void) sregs_base = of_iomap(np, 0); WARN_ON(!sregs_base); - pm_power_off = highbank_power_off; + register_platform_power_off(highbank_power_off); highbank_pm_init(); bus_register_notifier(&platform_bus_type, &highbank_platform_nb); diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 33533e35720f8..c0b1f7e6be874 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -1096,7 +1096,7 @@ static void __init spitz_init(void) software_node_register(&spitz_scoop_2_gpiochip_node); init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0); - pm_power_off = spitz_poweroff; + register_platform_power_off(spitz_poweroff); PMCR = 0x00; diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 0c586047d130f..5383a26f51169 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c @@ -298,7 +298,7 @@ static struct platform_device *sa11x0_devices[] __initdata = { static int __init sa1100_init(void) { struct resource wdt_res = DEFINE_RES_MEM(0x90000000, 0x20); - pm_power_off = sa1100_power_off; + register_platform_power_off(sa1100_power_off); regulator_has_full_constraints(); diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index 0ab40087ae1cc..1d294255d7083 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c @@ -141,7 +141,7 @@ static void __init vt8500_init(void) pr_err("%s:ioremap(power_off) failed\n", __func__); } if (pmc_base) - pm_power_off = &vt8500_power_off; + register_platform_power_off(vt8500_power_off); else pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__); } diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index a395b6c0aae2a..8655bc3d36347 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -541,7 +541,7 @@ static int __init xen_late_init(void) if (!xen_domain()) return -ENODEV; - pm_power_off = xen_power_off; + register_platform_power_off(xen_power_off); register_restart_handler(&xen_restart_nb); if (!xen_initial_domain()) { struct timespec64 ts; -- 2.39.2