From mboxrd@z Thu Jan 1 00:00:00 1970 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 222C9C41513 for ; Thu, 3 Aug 2023 11:28:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:Message-ID:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ntLsIALofN6g2CCEdgDR4pxgXoypb1xWh5rRrIq11pw=; b=UJYi8ka4hN7d+N aOne2xJWW3wmYaCFsSat999bXerSa/K/dOCA3B9d2TFuBYrM3zVBH4DENWcqBoHejqyQ/JjGlvYio esx+cJ7AWzbfpgEMWPZ3NF2hpZ2A3UU41jUiZhVblmHtOMQicRKbcx5gasRsajq5R+qhiQwn4zdYh UTiSTW+uHboiWQHLLE2wydTRBSp+YMN48BNfsEb8YRlGVL3d0VpD73DlFHrXiXVvNOYCOeJAe+lGQ yWxN7xwMia8yrxxvmbnZZXEEjhzO8H8PEQTvcjWQU2JR4Ek0Z3LdF/d2mUsVy1+HYFAkSfV+yG1Jb +QsdNihWtVa6E+DV5wgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRWUo-007owd-2q; Thu, 03 Aug 2023 11:27:58 +0000 Received: from smtp2.axis.com ([195.60.68.18]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRWUl-007oqb-0L for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2023 11:27:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1691062075; x=1722598075; h=from:date:subject:mime-version:content-transfer-encoding: message-id:to:cc; bh=CWAbCO1we5B8Sov+saRxkyn+MCI47BcIO2eUN5nHl+E=; b=I3ksMGPWk1M1u2e/wVXpfeaWZaCGlkORiD2iU3eIZlza9/hHuSmJgB+C r7SBcu8DQnpsrPXgyhU9bKAXbVBMuLkDYjaQK5g14pPPcKNqhVbn0qfH3 43AWyMXeNLl406xd8aF+0CgpNmX0wIXuhQvJ+cpfGL2Up9jkJ9vgWii5C RAsdKcUZCBghz46qqSTu0LTFcbeIJayQKchXlNgod9FgKYLnQWkseh9PF dEYIJdqWTRcA8tAVtRzxkhi1V4vIx0jqR5z7dVwT+YX6Ah3pXgC0UdU7g JXmFzCYg4NvVa/s/zoN0YY/Ssx/4u+vaBA7zpuvlVdRj2CUnlr3mdrDcT w==; From: Anton Eliasson Date: Thu, 3 Aug 2023 13:26:42 +0200 Subject: [PATCH] tty: serial: samsung: Set missing PM ops for hibernation support MIME-Version: 1.0 Message-ID: <20230803-samsung_tty_pm_ops-v1-1-1ea7be72194d@axis.com> X-B4-Tracking: v=1; b=H4sIAPGOy2QC/x3MQQqAIBBA0avIrBM0g7KrRIjUVLPIxKkoorsnL d/i/wcYEyFDKx5IeBLTFjJ0IWBYfJhR0pgNpSqNqo2W7Fc+wuz2/XZxdVtkWQ+2mYyyvkILOYw JJ7r+ade/7weqG39rZAAAAA== To: Krzysztof Kozlowski , Alim Akhtar , Greg Kroah-Hartman , Jiri Slaby CC: , , , , , Anton Eliasson X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_042755_458695_23922942 X-CRM114-Status: GOOD ( 11.73 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org At least freeze, restore and thaw need to be set in order for the driver to support system hibernation. The existing suspend/resume functions can be reused since those functions don't touch the device's power state or wakeup capability. Use the helper macros SET_SYSTEM_SLEEP_PM_OPS and SET_NOIRQ_SYSTEM_SLEEP_PM_OPS for symmetry with similar drivers. Signed-off-by: Anton Eliasson --- I have not investigated the impact of adding the additional noirq handler functions. The hardware that I tested on (Axis ARTPEC-8) appears to work both with and without them assigned. Other similar drivers that use noirq handlers assign them to both resume, thaw and restore so I follow that style also. --- drivers/tty/serial/samsung_tty.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index b29e9dfd81a6..e2247c11067d 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2273,9 +2273,8 @@ static int s3c24xx_serial_resume_noirq(struct device *dev) } static const struct dev_pm_ops s3c24xx_serial_pm_ops = { - .suspend = s3c24xx_serial_suspend, - .resume = s3c24xx_serial_resume, - .resume_noirq = s3c24xx_serial_resume_noirq, + SET_SYSTEM_SLEEP_PM_OPS(s3c24xx_serial_suspend, s3c24xx_serial_resume) + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, s3c24xx_serial_resume_noirq) }; #define SERIAL_SAMSUNG_PM_OPS (&s3c24xx_serial_pm_ops) --- base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 change-id: 20230731-samsung_tty_pm_ops-7c98f309a4e9 Best regards, -- Anton Eliasson _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel