Lines Matching refs:chan

47 	struct savagefb_i2c_chan *chan = data;  in savage4_gpio_setscl()  local
50 r = readl(chan->ioaddr + chan->reg); in savage4_gpio_setscl()
55 writel(r, chan->ioaddr + chan->reg); in savage4_gpio_setscl()
56 readl(chan->ioaddr + chan->reg); /* flush posted write */ in savage4_gpio_setscl()
61 struct savagefb_i2c_chan *chan = data; in savage4_gpio_setsda() local
64 r = readl(chan->ioaddr + chan->reg); in savage4_gpio_setsda()
69 writel(r, chan->ioaddr + chan->reg); in savage4_gpio_setsda()
70 readl(chan->ioaddr + chan->reg); /* flush posted write */ in savage4_gpio_setsda()
75 struct savagefb_i2c_chan *chan = data; in savage4_gpio_getscl() local
77 return (0 != (readl(chan->ioaddr + chan->reg) & SAVAGE4_I2C_SCL_IN)); in savage4_gpio_getscl()
82 struct savagefb_i2c_chan *chan = data; in savage4_gpio_getsda() local
84 return (0 != (readl(chan->ioaddr + chan->reg) & SAVAGE4_I2C_SDA_IN)); in savage4_gpio_getsda()
89 struct savagefb_i2c_chan *chan = data; in prosavage_gpio_setscl() local
92 r = VGArCR(chan->reg, chan->par); in prosavage_gpio_setscl()
100 VGAwCR(chan->reg, r, chan->par); in prosavage_gpio_setscl()
105 struct savagefb_i2c_chan *chan = data; in prosavage_gpio_setsda() local
108 r = VGArCR(chan->reg, chan->par); in prosavage_gpio_setsda()
116 VGAwCR(chan->reg, r, chan->par); in prosavage_gpio_setsda()
121 struct savagefb_i2c_chan *chan = data; in prosavage_gpio_getscl() local
123 return (VGArCR(chan->reg, chan->par) & PROSAVAGE_I2C_SCL_IN) ? 1 : 0; in prosavage_gpio_getscl()
128 struct savagefb_i2c_chan *chan = data; in prosavage_gpio_getsda() local
130 return (VGArCR(chan->reg, chan->par) & PROSAVAGE_I2C_SDA_IN) ? 1 : 0; in prosavage_gpio_getsda()
133 static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan, in savage_setup_i2c_bus() argument
138 if (chan->par) { in savage_setup_i2c_bus()
139 strcpy(chan->adapter.name, name); in savage_setup_i2c_bus()
140 chan->adapter.owner = THIS_MODULE; in savage_setup_i2c_bus()
141 chan->adapter.algo_data = &chan->algo; in savage_setup_i2c_bus()
142 chan->adapter.dev.parent = &chan->par->pcidev->dev; in savage_setup_i2c_bus()
143 chan->algo.udelay = 10; in savage_setup_i2c_bus()
144 chan->algo.timeout = 20; in savage_setup_i2c_bus()
145 chan->algo.data = chan; in savage_setup_i2c_bus()
147 i2c_set_adapdata(&chan->adapter, chan); in savage_setup_i2c_bus()
150 chan->algo.setsda(chan, 1); in savage_setup_i2c_bus()
151 chan->algo.setscl(chan, 1); in savage_setup_i2c_bus()
154 rc = i2c_bit_add_bus(&chan->adapter); in savage_setup_i2c_bus()
157 dev_dbg(&chan->par->pcidev->dev, in savage_setup_i2c_bus()
160 dev_warn(&chan->par->pcidev->dev, in savage_setup_i2c_bus()
170 par->chan.par = par; in savagefb_create_i2c_busses()
176 par->chan.reg = CR_SERIAL2; in savagefb_create_i2c_busses()
177 par->chan.ioaddr = par->mmio.vbase; in savagefb_create_i2c_busses()
178 par->chan.algo.setsda = prosavage_gpio_setsda; in savagefb_create_i2c_busses()
179 par->chan.algo.setscl = prosavage_gpio_setscl; in savagefb_create_i2c_busses()
180 par->chan.algo.getsda = prosavage_gpio_getsda; in savagefb_create_i2c_busses()
181 par->chan.algo.getscl = prosavage_gpio_getscl; in savagefb_create_i2c_busses()
184 par->chan.reg = CR_SERIAL1; in savagefb_create_i2c_busses()
186 par->chan.reg = CR_SERIAL2; in savagefb_create_i2c_busses()
187 par->chan.ioaddr = par->mmio.vbase; in savagefb_create_i2c_busses()
188 par->chan.algo.setsda = prosavage_gpio_setsda; in savagefb_create_i2c_busses()
189 par->chan.algo.setscl = prosavage_gpio_setscl; in savagefb_create_i2c_busses()
190 par->chan.algo.getsda = prosavage_gpio_getsda; in savagefb_create_i2c_busses()
191 par->chan.algo.getscl = prosavage_gpio_getscl; in savagefb_create_i2c_busses()
194 par->chan.reg = MM_SERIAL1; in savagefb_create_i2c_busses()
195 par->chan.ioaddr = par->mmio.vbase; in savagefb_create_i2c_busses()
196 par->chan.algo.setsda = savage4_gpio_setsda; in savagefb_create_i2c_busses()
197 par->chan.algo.setscl = savage4_gpio_setscl; in savagefb_create_i2c_busses()
198 par->chan.algo.getsda = savage4_gpio_getsda; in savagefb_create_i2c_busses()
199 par->chan.algo.getscl = savage4_gpio_getscl; in savagefb_create_i2c_busses()
202 par->chan.par = NULL; in savagefb_create_i2c_busses()
205 savage_setup_i2c_bus(&par->chan, "SAVAGE DDC2"); in savagefb_create_i2c_busses()
212 if (par->chan.par) in savagefb_delete_i2c_busses()
213 i2c_del_adapter(&par->chan.adapter); in savagefb_delete_i2c_busses()
215 par->chan.par = NULL; in savagefb_delete_i2c_busses()
223 if (par->chan.par) in savagefb_probe_i2c_connector()
224 edid = fb_ddc_read(&par->chan.adapter); in savagefb_probe_i2c_connector()