Files
OrangePi_CM5/drivers/base/power/power.h
T

44 lines
775 B
C
Raw Normal View History

#ifdef CONFIG_PM_SLEEP
2005-04-16 15:20:36 -07:00
/*
* main.c
*/
extern struct list_head dpm_active; /* The active device list */
2005-04-16 15:20:36 -07:00
2007-11-21 14:55:18 -08:00
static inline struct device *to_device(struct list_head *entry)
2005-04-16 15:20:36 -07:00
{
return container_of(entry, struct device, power.entry);
2005-04-16 15:20:36 -07:00
}
extern int device_pm_add(struct device *);
2005-04-16 15:20:36 -07:00
extern void device_pm_remove(struct device *);
2007-11-21 14:55:18 -08:00
#else /* CONFIG_PM_SLEEP */
static inline int device_pm_add(struct device *dev) { return 0; }
static inline void device_pm_remove(struct device *dev) {}
2008-01-12 20:40:46 +01:00
2007-11-21 14:55:18 -08:00
#endif
#ifdef CONFIG_PM
2005-04-16 15:20:36 -07:00
/*
* sysfs.c
*/
extern int dpm_sysfs_add(struct device *);
extern void dpm_sysfs_remove(struct device *);
2007-11-21 14:55:18 -08:00
#else /* CONFIG_PM */
2005-04-16 15:20:36 -07:00
2007-11-21 14:55:18 -08:00
static inline int dpm_sysfs_add(struct device *dev)
2005-04-16 15:20:36 -07:00
{
return 0;
}
2007-11-21 14:55:18 -08:00
static inline void dpm_sysfs_remove(struct device *dev)
{
2005-04-16 15:20:36 -07:00
}
#endif