aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_mode.h
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-08-05 21:21:16 -0400
committerDave Airlie <airlied@redhat.com>2010-08-09 20:46:48 -0400
commitf376b94fbc0a313a606748206340cbef6c2adf6b (patch)
tree79687e8c214bf70251c242f8042bc46d6fc61020 /drivers/gpu/drm/radeon/radeon_mode.h
parent1729dd33d20bddf1b3f371f3090f0cfd6be50b7a (diff)
drm/radeon/kms: unify i2c handling
Previously we added i2c buses as needed when enumerating connectors power management, etc. This only exposed the actual buses used and could have lead to the same buse getting created more than once if one buses was used for more than one purpose. This patch sets up all i2c buses on the card in one place and users of the buses just point back to the one instance. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_mode.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 71aea4037e90..02d4e2af6180 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -82,6 +82,8 @@ enum radeon_hpd_id {
82 RADEON_HPD_NONE = 0xff, 82 RADEON_HPD_NONE = 0xff,
83}; 83};
84 84
85#define RADEON_MAX_I2C_BUS 16
86
85/* radeon gpio-based i2c 87/* radeon gpio-based i2c
86 * 1. "mask" reg and bits 88 * 1. "mask" reg and bits
87 * grabs the gpio pins for software use 89 * grabs the gpio pins for software use
@@ -445,6 +447,15 @@ extern void atombios_dig_transmitter_setup(struct drm_encoder *encoder,
445extern int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, 447extern int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
446 uint8_t write_byte, uint8_t *read_byte); 448 uint8_t write_byte, uint8_t *read_byte);
447 449
450extern void radeon_i2c_init(struct radeon_device *rdev);
451extern void radeon_i2c_fini(struct radeon_device *rdev);
452extern void radeon_combios_i2c_init(struct radeon_device *rdev);
453extern void radeon_atombios_i2c_init(struct radeon_device *rdev);
454extern void radeon_i2c_add(struct radeon_device *rdev,
455 struct radeon_i2c_bus_rec *rec,
456 const char *name);
457extern struct radeon_i2c_chan *radeon_i2c_lookup(struct radeon_device *rdev,
458 struct radeon_i2c_bus_rec *i2c_bus);
448extern struct radeon_i2c_chan *radeon_i2c_create_dp(struct drm_device *dev, 459extern struct radeon_i2c_chan *radeon_i2c_create_dp(struct drm_device *dev,
449 struct radeon_i2c_bus_rec *rec, 460 struct radeon_i2c_bus_rec *rec,
450 const char *name); 461 const char *name);