From a674701be040b4270f4b90ee21398e7e31872e1e Mon Sep 17 00:00:00 2001 From: Joshua Cha Date: Thu, 6 Feb 2025 18:26:59 +0900 Subject: [PATCH] nvsciipc: add suspend/resume callback print suspend/resume status JIRA NVIPC-3318 Change-Id: I43585ba82ccb75dda92f7276e5d5bab416087818 Signed-off-by: Joshua Cha Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297783 Reviewed-by: Jeungwoo Yoo Reviewed-by: Simon Je GVS: buildbot_gerritrpt Reviewed-by: svcacv --- drivers/misc/nvsciipc/nvsciipc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/misc/nvsciipc/nvsciipc.c b/drivers/misc/nvsciipc/nvsciipc.c index 92a19565..23017fb5 100644 --- a/drivers/misc/nvsciipc/nvsciipc.c +++ b/drivers/misc/nvsciipc/nvsciipc.c @@ -933,12 +933,34 @@ static int nvsciipc_remove_wrapper(struct platform_device *pdev) } #endif + +#ifdef CONFIG_PM +static int nvsciipc_suspend(struct platform_device *pdev, pm_message_t state) +{ + dev_notice(&pdev->dev, "nvipc: Suspended\n"); + + return 0; +} + +static int nvsciipc_resume(struct platform_device *pdev) +{ + dev_notice(&pdev->dev, "nvipc: Resuming\n"); + + return 0; +} +#endif /* CONFIG_PM */ + static struct platform_driver nvsciipc_driver = { .probe = nvsciipc_probe, .remove = nvsciipc_remove_wrapper, .driver = { .name = MODULE_NAME, }, +#ifdef CONFIG_PM + .suspend = nvsciipc_suspend, + .resume = nvsciipc_resume, +#endif /* CONFIG_PM */ + }; static int __init nvsciipc_module_init(void)