Skip to content

Commit

Permalink
nvidiafb: Correctly assign the i2c class with the port reversal
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Oct 16, 2007
1 parent e400b6e commit 076a7dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/video/nvidia/nv_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ void nvidia_create_i2c_busses(struct nvidia_par *par)
par->chan[2].par = par;

par->chan[0].ddc_base = (par->reverse_i2c) ? 0x36 : 0x3e;
nvidia_setup_i2c_bus(&par->chan[0], "nvidia #0", 0);
nvidia_setup_i2c_bus(&par->chan[0], "nvidia #0",
(par->reverse_i2c) ? I2C_CLASS_HWMON : 0);

par->chan[1].ddc_base = (par->reverse_i2c) ? 0x3e : 0x36;
nvidia_setup_i2c_bus(&par->chan[1], "nvidia #1", I2C_CLASS_HWMON);
nvidia_setup_i2c_bus(&par->chan[1], "nvidia #1",
(par->reverse_i2c) ? 0 : I2C_CLASS_HWMON);

par->chan[2].ddc_base = 0x50;
nvidia_setup_i2c_bus(&par->chan[2], "nvidia #2", 0);
Expand Down

0 comments on commit 076a7dc

Please sign in to comment.