From 62632767cffa0a521bd518224e6a940cf41eaa67 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Mon, 21 Feb 2011 11:42:01 +0800 Subject: [PATCH] rk29: vpu: add shutdown support --- arch/arm/mach-rk29/vpu.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-rk29/vpu.c b/arch/arm/mach-rk29/vpu.c index 5811e59fead7..16dfd60a9293 100644 --- a/arch/arm/mach-rk29/vpu.c +++ b/arch/arm/mach-rk29/vpu.c @@ -423,7 +423,13 @@ static struct miscdevice vpu_misc_device = { .fops = &vpu_fops, }; -#ifdef CONFIG_PM +static void vpu_shutdown(struct platform_device *pdev) +{ + pr_info("shutdown..."); + vpu_power_off(); + pr_cont("done\n"); +} + static int vpu_suspend(struct platform_device *pdev, pm_message_t state) { bool enabled = client.enabled; @@ -451,10 +457,10 @@ static struct platform_driver vpu_pm_driver = { .name = "vpu", .owner = THIS_MODULE, }, + .shutdown = vpu_shutdown, .suspend = vpu_suspend, .resume = vpu_resume, }; -#endif static int __init vpu_init(void) { @@ -504,10 +510,8 @@ static int __init vpu_init(void) vpu_power_off(); -#ifdef CONFIG_PM platform_device_register(&vpu_pm_device); platform_driver_probe(&vpu_pm_driver, NULL); -#endif pr_info("init success\n"); return 0; @@ -527,10 +531,8 @@ err_reserve_io: static void __exit vpu_exit(void) { -#ifdef CONFIG_PM platform_device_unregister(&vpu_pm_device); platform_driver_unregister(&vpu_pm_driver); -#endif vpu_power_on(); -- 2.34.1