1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2019 Intel Corporation 4 */ 5 6 #ifndef __INTEL_GMBUS_H__ 7 #define __INTEL_GMBUS_H__ 8 9 #include <linux/types.h> 10 11 struct drm_i915_private; 12 struct i2c_adapter; 13 14 int intel_gmbus_setup(struct drm_i915_private *dev_priv); 15 void intel_gmbus_teardown(struct drm_i915_private *dev_priv); 16 bool intel_gmbus_is_valid_pin(struct drm_i915_private *dev_priv, 17 unsigned int pin); 18 int intel_gmbus_output_aksv(struct i2c_adapter *adapter); 19 20 struct i2c_adapter * 21 intel_gmbus_get_adapter(struct drm_i915_private *dev_priv, unsigned int pin); 22 void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed); 23 void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit); 24 bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter); 25 void intel_gmbus_reset(struct drm_i915_private *dev_priv); 26 27 #endif /* __INTEL_GMBUS_H__ */ 28