suspend/resume call back functions

loody miloody at gmail.com
Sat Oct 5 11:30:45 EDT 2013


hi all:
At the end of mail are the platform_driver and device_driver structures:
My question are:
1. what is the relation between "
platform_driver-> suspend/resumt,
device_driver->suspend/resume
device_driver->pm->suspend/resume"

2. and what are their relationship?

Appreciate your kind help,


struct platform_driver {
         int (*probe)(struct platform_device *);
         int (*remove)(struct platform_device *);
         void (*shutdown)(struct platform_device *);
         int (*suspend)(struct platform_device *, pm_message_t state);
         int (*resume)(struct platform_device *);
         struct device_driver driver;
         const struct platform_device_id *id_table;
 };

 struct device_driver {
         const char              *name;
         struct bus_type         *bus;
         struct module           *owner;
         const char              *mod_name;      /* used for built-in modules */
         bool suppress_bind_attrs;       /* disables bind/unbind via sysfs */
         const struct of_device_id       *of_match_table;
         const struct acpi_device_id     *acpi_match_table;
         int (*probe) (struct device *dev);
         int (*remove) (struct device *dev);
         void (*shutdown) (struct device *dev);
         int (*suspend) (struct device *dev, pm_message_t state);
         int (*resume) (struct device *dev);
         const struct attribute_group **groups;
         const struct dev_pm_ops *pm;
         struct driver_private *p;
 };



More information about the Kernelnewbies mailing list