~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to include/linux/pm_runtime.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        return !dev->power.disable_depth;
88
88
}
89
89
 
 
90
static inline bool pm_runtime_callbacks_present(struct device *dev)
 
91
{
 
92
        return !dev->power.no_callbacks;
 
93
}
 
94
 
90
95
static inline void pm_runtime_mark_last_busy(struct device *dev)
91
96
{
92
97
        ACCESS_ONCE(dev->power.last_busy) = jiffies;
133
138
static inline void pm_runtime_no_callbacks(struct device *dev) {}
134
139
static inline void pm_runtime_irq_safe(struct device *dev) {}
135
140
 
 
141
static inline bool pm_runtime_callbacks_present(struct device *dev) { return false; }
136
142
static inline void pm_runtime_mark_last_busy(struct device *dev) {}
137
143
static inline void __pm_runtime_use_autosuspend(struct device *dev,
138
144
                                                bool use) {}
239
245
        __pm_runtime_use_autosuspend(dev, false);
240
246
}
241
247
 
 
248
struct pm_clk_notifier_block {
 
249
        struct notifier_block nb;
 
250
        struct dev_power_domain *pwr_domain;
 
251
        char *con_ids[];
 
252
};
 
253
 
 
254
#ifdef CONFIG_PM_RUNTIME_CLK
 
255
extern int pm_runtime_clk_init(struct device *dev);
 
256
extern void pm_runtime_clk_destroy(struct device *dev);
 
257
extern int pm_runtime_clk_add(struct device *dev, const char *con_id);
 
258
extern void pm_runtime_clk_remove(struct device *dev, const char *con_id);
 
259
extern int pm_runtime_clk_suspend(struct device *dev);
 
260
extern int pm_runtime_clk_resume(struct device *dev);
 
261
#else
 
262
static inline int pm_runtime_clk_init(struct device *dev)
 
263
{
 
264
        return -EINVAL;
 
265
}
 
266
static inline void pm_runtime_clk_destroy(struct device *dev)
 
267
{
 
268
}
 
269
static inline int pm_runtime_clk_add(struct device *dev, const char *con_id)
 
270
{
 
271
        return -EINVAL;
 
272
}
 
273
static inline void pm_runtime_clk_remove(struct device *dev, const char *con_id)
 
274
{
 
275
}
 
276
#define pm_runtime_clock_suspend        NULL
 
277
#define pm_runtime_clock_resume         NULL
 
278
#endif
 
279
 
 
280
#ifdef CONFIG_HAVE_CLK
 
281
extern void pm_runtime_clk_add_notifier(struct bus_type *bus,
 
282
                                        struct pm_clk_notifier_block *clknb);
 
283
#else
 
284
static inline void pm_runtime_clk_add_notifier(struct bus_type *bus,
 
285
                                        struct pm_clk_notifier_block *clknb)
 
286
{
 
287
}
 
288
#endif
 
289
 
242
290
#endif