~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/pm_clock.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php