aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-05-30 15:16:25 -0400
committerKeith Packard <keithp@keithp.com>2009-06-18 18:53:57 -0400
commitf9c10a9b96a31b4a82a4fa807400c04f00284068 (patch)
treed49abf9846d0177aad3b317da1ea98d9ad129ca6 /drivers/gpu/drm/i915/intel_drv.h
parentb99e228d354cc1e7f19fb8b5f1297d493e309186 (diff)
drm/i915: Change I2C api to pass around i2c_adapters
The existing API passed around intel_i2c_chan pointers, which are dependent on the i2c bit-banging algo. This precluded the driver from using outputs which use a different algo. Switching to the more general i2c_adpater allows the driver to support non bit-banging DDC. This also required moving the slave address into the output private structures. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index cd4b9c5f715e..d89a2fed35af 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -65,7 +65,6 @@ struct intel_i2c_chan {
65 u32 reg; /* GPIO reg */ 65 u32 reg; /* GPIO reg */
66 struct i2c_adapter adapter; 66 struct i2c_adapter adapter;
67 struct i2c_algo_bit_data algo; 67 struct i2c_algo_bit_data algo;
68 u8 slave_addr;
69}; 68};
70 69
71struct intel_framebuffer { 70struct intel_framebuffer {
@@ -79,8 +78,8 @@ struct intel_output {
79 78
80 struct drm_encoder enc; 79 struct drm_encoder enc;
81 int type; 80 int type;
82 struct intel_i2c_chan *i2c_bus; /* for control functions */ 81 struct i2c_adapter *i2c_bus;
83 struct intel_i2c_chan *ddc_bus; /* for DDC only stuff */ 82 struct i2c_adapter *ddc_bus;
84 bool load_detect_temp; 83 bool load_detect_temp;
85 bool needs_tv_clock; 84 bool needs_tv_clock;
86 void *dev_priv; 85 void *dev_priv;
@@ -104,9 +103,9 @@ struct intel_crtc {
104#define enc_to_intel_output(x) container_of(x, struct intel_output, enc) 103#define enc_to_intel_output(x) container_of(x, struct intel_output, enc)
105#define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base) 104#define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
106 105
107struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg, 106struct i2c_adapter *intel_i2c_create(struct drm_device *dev, const u32 reg,
108 const char *name); 107 const char *name);
109void intel_i2c_destroy(struct intel_i2c_chan *chan); 108void intel_i2c_destroy(struct i2c_adapter *adapter);
110int intel_ddc_get_modes(struct intel_output *intel_output); 109int intel_ddc_get_modes(struct intel_output *intel_output);
111extern bool intel_ddc_probe(struct intel_output *intel_output); 110extern bool intel_ddc_probe(struct intel_output *intel_output);
112void intel_i2c_quirk_set(struct drm_device *dev, bool enable); 111void intel_i2c_quirk_set(struct drm_device *dev, bool enable);