xref: /linux/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a_devfreq.h (revision 84318277d6334c6981ab326d4acc87c6a6ddc9b8)
1*6ca1701cSAaron Kling /* SPDX-License-Identifier: MIT */
2*6ca1701cSAaron Kling #ifndef __GK20A_DEVFREQ_H__
3*6ca1701cSAaron Kling #define __GK20A_DEVFREQ_H__
4*6ca1701cSAaron Kling 
5*6ca1701cSAaron Kling #include <linux/devfreq.h>
6*6ca1701cSAaron Kling 
7*6ca1701cSAaron Kling struct gk20a_devfreq;
8*6ca1701cSAaron Kling 
9*6ca1701cSAaron Kling #if defined(CONFIG_PM_DEVFREQ)
10*6ca1701cSAaron Kling int gk20a_devfreq_init(struct nvkm_clk *base, struct gk20a_devfreq **devfreq);
11*6ca1701cSAaron Kling 
12*6ca1701cSAaron Kling int gk20a_devfreq_resume(struct device *dev);
13*6ca1701cSAaron Kling int gk20a_devfreq_suspend(struct device *dev);
14*6ca1701cSAaron Kling #else
15*6ca1701cSAaron Kling static inline int gk20a_devfreq_init(struct nvkm_clk *base, struct gk20a_devfreq **devfreq)
16*6ca1701cSAaron Kling {
17*6ca1701cSAaron Kling 	return 0;
18*6ca1701cSAaron Kling }
19*6ca1701cSAaron Kling 
20*6ca1701cSAaron Kling static inline int gk20a_devfreq_resume(struct device dev) { return 0; }
21*6ca1701cSAaron Kling static inline int gk20a_devfreq_suspend(struct device *dev) { return 0; }
22*6ca1701cSAaron Kling #endif /* CONFIG_PM_DEVFREQ */
23*6ca1701cSAaron Kling 
24*6ca1701cSAaron Kling #endif /* __GK20A_DEVFREQ_H__ */
25