From patchwork Mon Jul 29 12:35:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 13744834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40DDDC3DA4A for ; Mon, 29 Jul 2024 12:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=E1t2slHF8kd+FV4537/57jAGsLGmbZ2/z9jipE7qiaU=; b=1RvOG+deQS6TTC1R5T1stseFC7 jn2sfPgyhHJ4q8Gk/PrID0k55yLsGeop3gVGVFobi8Dur8WKod6bUZv5D53fG/yuRv7HHHIIQpS1Z R9ZuVsqY1hCt0uasiD1RURs5sRXMptIVLXgvf2pCP4+RwVL+xEAAaAo9AD/aFXTMUSIUzZBQmi9GB Tn9ivv7J5woUFrqBrxRkH5TFG0f2j1K/20jwGGgM3grYBBDqQFPV+VuNDQAtpweT61xWUqUkV5vVf Xso/UDThSB1f0H73EajiXhbueLRGbN0qTqbgHFB5idM2SJhH5fsYlmvxv8cgjC8nEdRuQ1GVwj5ig sLiqeXZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYPcS-0000000BFvF-0e55; Mon, 29 Jul 2024 12:36:52 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYPbc-0000000BFcz-2P0r for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 12:36:02 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 46TCZfes067690; Mon, 29 Jul 2024 07:35:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1722256542; bh=E1t2slHF8kd+FV4537/57jAGsLGmbZ2/z9jipE7qiaU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wvU/R4JI26/NgeSr5ZzUGuJlYHB8SLtbT2u4bPVRYGgGcTzLskOhgO4/ruHJ35w77 bjZd+ARzwIV0Aqw3iSgcG2FsFuZxDY47G4rsVU+QzVzGkitMwZEOsndFo1EKcYCnK5 9cabEDDKskcXWUueTGRmXug1lkUmoBVXxDGiyiHM= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 46TCZfKK017807 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 29 Jul 2024 07:35:41 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 29 Jul 2024 07:35:41 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 29 Jul 2024 07:35:41 -0500 Received: from fllvsmtp7.itg.ti.com ([10.249.42.149]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 46TCZd0j128014; Mon, 29 Jul 2024 07:35:40 -0500 From: Andrew Davis To: Andre Przywara , Russell King , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Daniel Mack , Haojian Zhuang , Robert Jarzmik CC: , , , Andrew Davis Subject: [PATCH v2 2/7] ARM: imx: Switch to new sys-off handler API Date: Mon, 29 Jul 2024 07:35:33 -0500 Message-ID: <20240729123538.175704-3-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729123538.175704-1-afd@ti.com> References: <20240729123538.175704-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_053600_756287_A719CCD3 X-CRM114-Status: GOOD ( 13.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Shawn Guo --- arch/arm/mach-imx/pm-imx6.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index b36f05b54cc76..a671ca498f887 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -634,13 +634,11 @@ static void imx6_pm_stby_poweroff(void) static int imx6_pm_stby_poweroff_probe(void) { - if (pm_power_off) { - pr_warn("%s: pm_power_off already claimed %p %ps!\n", - __func__, pm_power_off, pm_power_off); + if (register_platform_power_off(imx6_pm_stby_poweroff)) { + pr_warn("%s: platform power off already claimed!\n", __func__); return -EBUSY; } - pm_power_off = imx6_pm_stby_poweroff; return 0; }