aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2007-10-16 04:29:36 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:20 -0400
commit076a7dce9ac3d89ef7215eecc1230177891383bd (patch)
tree04438720ff7d9926762673e83e974fa4507b8fbc /drivers/video/nvidia
parente400b6ec4ede4dc0aa8e5640425df5b29796fe0e (diff)
nvidiafb: Correctly assign the i2c class with the port reversal
If the i2c ports are to be reversed, I2C_CLASS_HWMON assignment must also be reversed. Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/nvidia')
-rw-r--r--drivers/video/nvidia/nv_i2c.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c
index 0cbcb3d833fb..6fd7cb8f9b8e 100644
--- a/drivers/video/nvidia/nv_i2c.c
+++ b/drivers/video/nvidia/nv_i2c.c
@@ -126,10 +126,12 @@ void nvidia_create_i2c_busses(struct nvidia_par *par)
126 par->chan[2].par = par; 126 par->chan[2].par = par;
127 127
128 par->chan[0].ddc_base = (par->reverse_i2c) ? 0x36 : 0x3e; 128 par->chan[0].ddc_base = (par->reverse_i2c) ? 0x36 : 0x3e;
129 nvidia_setup_i2c_bus(&par->chan[0], "nvidia #0", 0); 129 nvidia_setup_i2c_bus(&par->chan[0], "nvidia #0",
130 (par->reverse_i2c) ? I2C_CLASS_HWMON : 0);
130 131
131 par->chan[1].ddc_base = (par->reverse_i2c) ? 0x3e : 0x36; 132 par->chan[1].ddc_base = (par->reverse_i2c) ? 0x3e : 0x36;
132 nvidia_setup_i2c_bus(&par->chan[1], "nvidia #1", I2C_CLASS_HWMON); 133 nvidia_setup_i2c_bus(&par->chan[1], "nvidia #1",
134 (par->reverse_i2c) ? 0 : I2C_CLASS_HWMON);
133 135
134 par->chan[2].ddc_base = 0x50; 136 par->chan[2].ddc_base = 0x50;
135 nvidia_setup_i2c_bus(&par->chan[2], "nvidia #2", 0); 137 nvidia_setup_i2c_bus(&par->chan[2], "nvidia #2", 0);