xref: /openbmc/linux/drivers/gpu/drm/i915/i915_hwmon.h (revision 6db6b729)
1 /* SPDX-License-Identifier: MIT */
2 
3 /*
4  * Copyright © 2022 Intel Corporation
5  */
6 
7 #ifndef __I915_HWMON_H__
8 #define __I915_HWMON_H__
9 
10 #include <linux/types.h>
11 
12 struct drm_i915_private;
13 struct intel_gt;
14 
15 #if IS_REACHABLE(CONFIG_HWMON)
16 void i915_hwmon_register(struct drm_i915_private *i915);
17 void i915_hwmon_unregister(struct drm_i915_private *i915);
18 void i915_hwmon_power_max_disable(struct drm_i915_private *i915, bool *old);
19 void i915_hwmon_power_max_restore(struct drm_i915_private *i915, bool old);
20 #else
21 static inline void i915_hwmon_register(struct drm_i915_private *i915) { };
22 static inline void i915_hwmon_unregister(struct drm_i915_private *i915) { };
23 static inline void i915_hwmon_power_max_disable(struct drm_i915_private *i915, bool *old) { };
24 static inline void i915_hwmon_power_max_restore(struct drm_i915_private *i915, bool old) { };
25 #endif
26 
27 #endif /* __I915_HWMON_H__ */
28