aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/riva
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/riva')
-rw-r--r--drivers/video/riva/rivafb-i2c.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c
index 0405e839ff93..ca9e7e81a9c5 100644
--- a/drivers/video/riva/rivafb-i2c.c
+++ b/drivers/video/riva/rivafb-i2c.c
@@ -88,13 +88,15 @@ static int riva_gpio_getsda(void* data)
88 return val; 88 return val;
89} 89}
90 90
91static int riva_setup_i2c_bus(struct riva_i2c_chan *chan, const char *name) 91static int riva_setup_i2c_bus(struct riva_i2c_chan *chan, const char *name,
92 unsigned int i2c_class)
92{ 93{
93 int rc; 94 int rc;
94 95
95 strcpy(chan->adapter.name, name); 96 strcpy(chan->adapter.name, name);
96 chan->adapter.owner = THIS_MODULE; 97 chan->adapter.owner = THIS_MODULE;
97 chan->adapter.id = I2C_HW_B_RIVA; 98 chan->adapter.id = I2C_HW_B_RIVA;
99 chan->adapter.class = i2c_class;
98 chan->adapter.algo_data = &chan->algo; 100 chan->adapter.algo_data = &chan->algo;
99 chan->adapter.dev.parent = &chan->par->pdev->dev; 101 chan->adapter.dev.parent = &chan->par->pdev->dev;
100 chan->algo.setsda = riva_gpio_setsda; 102 chan->algo.setsda = riva_gpio_setsda;
@@ -135,9 +137,9 @@ void riva_create_i2c_busses(struct riva_par *par)
135 par->chan[0].ddc_base = 0x3e; 137 par->chan[0].ddc_base = 0x3e;
136 par->chan[1].ddc_base = 0x36; 138 par->chan[1].ddc_base = 0x36;
137 par->chan[2].ddc_base = 0x50; 139 par->chan[2].ddc_base = 0x50;
138 riva_setup_i2c_bus(&par->chan[0], "BUS1"); 140 riva_setup_i2c_bus(&par->chan[0], "BUS1", 0);
139 riva_setup_i2c_bus(&par->chan[1], "BUS2"); 141 riva_setup_i2c_bus(&par->chan[1], "BUS2", I2C_CLASS_HWMON);
140 riva_setup_i2c_bus(&par->chan[2], "BUS3"); 142 riva_setup_i2c_bus(&par->chan[2], "BUS3", 0);
141} 143}
142 144
143void riva_delete_i2c_busses(struct riva_par *par) 145void riva_delete_i2c_busses(struct riva_par *par)