]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: coda: Add system resume interface
authorXiaolei Wang <xiaolei.wang@windriver.com>
Sat, 21 Dec 2024 03:14:55 +0000 (11:14 +0800)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 21 Feb 2025 09:33:08 +0000 (10:33 +0100)
When the system goes into sleep mode, the dependent
power will be turned off, so when the system resumes,
coda_hw_init() needs to be called, otherwise it will
get 'CODA PIC_RUN timeout' after resuming.

Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/chips-media/coda/coda-common.c

index 289a076c3bcc776faf923c24eaa0ebe3e891ee79..e6e3f5ec24f691fd5eac1896efc69d8541a49bf3 100644 (file)
@@ -3340,6 +3340,7 @@ static int coda_runtime_resume(struct device *dev)
 
 static const struct dev_pm_ops coda_pm_ops = {
        SET_RUNTIME_PM_OPS(NULL, coda_runtime_resume, NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static struct platform_driver coda_driver = {