Blame view
include/linux/pm_clock.h
2.45 KB
b5e8d269d
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
/* * pm_clock.h - Definitions and headers related to device clocks. * * Copyright (C) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Renesas Electronics Corp. * * This file is released under the GPLv2. */ #ifndef _LINUX_PM_CLOCK_H #define _LINUX_PM_CLOCK_H #include <linux/device.h> #include <linux/notifier.h> struct pm_clk_notifier_block { struct notifier_block nb; struct dev_pm_domain *pm_domain; char *con_ids[]; }; |
245bd6f6a
|
20 |
struct clk; |
75f504004
|
21 22 23 24 25 26 27 28 29 |
#ifdef CONFIG_PM extern int pm_clk_runtime_suspend(struct device *dev); extern int pm_clk_runtime_resume(struct device *dev); #define USE_PM_CLK_RUNTIME_OPS \ .runtime_suspend = pm_clk_runtime_suspend, \ .runtime_resume = pm_clk_runtime_resume, #else #define USE_PM_CLK_RUNTIME_OPS #endif |
b5e8d269d
|
30 31 32 33 34 35 36 37 38 39 40 |
#ifdef CONFIG_PM_CLK static inline bool pm_clk_no_clocks(struct device *dev) { return dev && dev->power.subsys_data && list_empty(&dev->power.subsys_data->clock_list); } extern void pm_clk_init(struct device *dev); extern int pm_clk_create(struct device *dev); extern void pm_clk_destroy(struct device *dev); extern int pm_clk_add(struct device *dev, const char *con_id); |
245bd6f6a
|
41 |
extern int pm_clk_add_clk(struct device *dev, struct clk *clk); |
498b5fdd4
|
42 |
extern int of_pm_clk_add_clk(struct device *dev, const char *name); |
02113ba93
|
43 |
extern int of_pm_clk_add_clks(struct device *dev); |
b5e8d269d
|
44 |
extern void pm_clk_remove(struct device *dev, const char *con_id); |
02113ba93
|
45 |
extern void pm_clk_remove_clk(struct device *dev, struct clk *clk); |
b5e8d269d
|
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
extern int pm_clk_suspend(struct device *dev); extern int pm_clk_resume(struct device *dev); #else static inline bool pm_clk_no_clocks(struct device *dev) { return true; } static inline void pm_clk_init(struct device *dev) { } static inline int pm_clk_create(struct device *dev) { return -EINVAL; } static inline void pm_clk_destroy(struct device *dev) { } static inline int pm_clk_add(struct device *dev, const char *con_id) { return -EINVAL; } |
245bd6f6a
|
67 68 69 70 71 |
static inline int pm_clk_add_clk(struct device *dev, struct clk *clk) { return -EINVAL; } |
02113ba93
|
72 73 74 75 |
static inline int of_pm_clk_add_clks(struct device *dev) { return -EINVAL; } |
b5e8d269d
|
76 77 78 79 80 |
static inline void pm_clk_remove(struct device *dev, const char *con_id) { } #define pm_clk_suspend NULL #define pm_clk_resume NULL |
02113ba93
|
81 82 83 |
static inline void pm_clk_remove_clk(struct device *dev, struct clk *clk) { } |
b5e8d269d
|
84 85 86 87 88 89 90 91 92 93 94 95 96 |
#endif #ifdef CONFIG_HAVE_CLK extern void pm_clk_add_notifier(struct bus_type *bus, struct pm_clk_notifier_block *clknb); #else static inline void pm_clk_add_notifier(struct bus_type *bus, struct pm_clk_notifier_block *clknb) { } #endif #endif |