platform_driver struct proper usage

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

platform_driver struct proper usage

930 Views
john_smith
Contributor II

Hello!

I have noticed that GPU driver's suspend/resume callbacks are never called. These callbacks are registered in such a way (drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c):

static struct platform_driver gpu_driver = {
    .probe      = gpu_probe,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
    .remove     = gpu_remove,
#else
    .remove     = __devexit_p(gpu_remove),
#endif

    .suspend    = gpu_suspend,
    .resume     = gpu_resume,

    .driver     = {
        .owner = THIS_MODULE,
        .name   = DEVICE_NAME,
#if defined(CONFIG_PM) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
        .pm     = &gpu_pm_ops,
#endif
    }
};

In init() function:

platform_driver_register(&gpu_driver);

But when we try echo freeze > sys/power/state (or any other power-down mode) we see that functions gpu_suspend() and gpu_resume() are never being called.

What can be the reason of it?

P.S. - SabreSD board, official Android 6 from nxp, linux kernel v4.1.15.

Labels (3)
0 Kudos
Reply
1 Reply

734 Views
igorpadykov
NXP Employee
NXP Employee

Hi John

reason may be that in low power modes gpu power is turned of

(which seems as better method), one can check VDD_PU_CAP

in Figure 50-1. Power system overview i.MX6DQ RM.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply