• Home
  • Raw
  • Download

Lines Matching refs:chan

29 	struct riva_i2c_chan 	*chan = data;  in riva_gpio_setscl()  local
30 struct riva_par *par = chan->par; in riva_gpio_setscl()
33 VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1); in riva_gpio_setscl()
41 VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1); in riva_gpio_setscl()
47 struct riva_i2c_chan *chan = data; in riva_gpio_setsda() local
48 struct riva_par *par = chan->par; in riva_gpio_setsda()
51 VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1); in riva_gpio_setsda()
59 VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1); in riva_gpio_setsda()
65 struct riva_i2c_chan *chan = data; in riva_gpio_getscl() local
66 struct riva_par *par = chan->par; in riva_gpio_getscl()
69 VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base); in riva_gpio_getscl()
78 struct riva_i2c_chan *chan = data; in riva_gpio_getsda() local
79 struct riva_par *par = chan->par; in riva_gpio_getsda()
82 VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base); in riva_gpio_getsda()
89 static int riva_setup_i2c_bus(struct riva_i2c_chan *chan, const char *name, in riva_setup_i2c_bus() argument
94 strcpy(chan->adapter.name, name); in riva_setup_i2c_bus()
95 chan->adapter.owner = THIS_MODULE; in riva_setup_i2c_bus()
96 chan->adapter.class = i2c_class; in riva_setup_i2c_bus()
97 chan->adapter.algo_data = &chan->algo; in riva_setup_i2c_bus()
98 chan->adapter.dev.parent = &chan->par->pdev->dev; in riva_setup_i2c_bus()
99 chan->algo.setsda = riva_gpio_setsda; in riva_setup_i2c_bus()
100 chan->algo.setscl = riva_gpio_setscl; in riva_setup_i2c_bus()
101 chan->algo.getsda = riva_gpio_getsda; in riva_setup_i2c_bus()
102 chan->algo.getscl = riva_gpio_getscl; in riva_setup_i2c_bus()
103 chan->algo.udelay = 40; in riva_setup_i2c_bus()
104 chan->algo.timeout = msecs_to_jiffies(2); in riva_setup_i2c_bus()
105 chan->algo.data = chan; in riva_setup_i2c_bus()
107 i2c_set_adapdata(&chan->adapter, chan); in riva_setup_i2c_bus()
110 riva_gpio_setsda(chan, 1); in riva_setup_i2c_bus()
111 riva_gpio_setscl(chan, 1); in riva_setup_i2c_bus()
114 rc = i2c_bit_add_bus(&chan->adapter); in riva_setup_i2c_bus()
116 dev_dbg(&chan->par->pdev->dev, "I2C bus %s registered.\n", name); in riva_setup_i2c_bus()
118 dev_warn(&chan->par->pdev->dev, in riva_setup_i2c_bus()
120 chan->par = NULL; in riva_setup_i2c_bus()
128 par->chan[0].par = par; in riva_create_i2c_busses()
129 par->chan[1].par = par; in riva_create_i2c_busses()
130 par->chan[2].par = par; in riva_create_i2c_busses()
132 par->chan[0].ddc_base = 0x36; in riva_create_i2c_busses()
133 par->chan[1].ddc_base = 0x3e; in riva_create_i2c_busses()
134 par->chan[2].ddc_base = 0x50; in riva_create_i2c_busses()
135 riva_setup_i2c_bus(&par->chan[0], "BUS1", I2C_CLASS_HWMON); in riva_create_i2c_busses()
136 riva_setup_i2c_bus(&par->chan[1], "BUS2", 0); in riva_create_i2c_busses()
137 riva_setup_i2c_bus(&par->chan[2], "BUS3", 0); in riva_create_i2c_busses()
145 if (!par->chan[i].par) in riva_delete_i2c_busses()
147 i2c_del_adapter(&par->chan[i].adapter); in riva_delete_i2c_busses()
148 par->chan[i].par = NULL; in riva_delete_i2c_busses()
156 if (par->chan[conn].par) in riva_probe_i2c_connector()
157 edid = fb_ddc_read(&par->chan[conn].adapter); in riva_probe_i2c_connector()