Lines Matching +full:chan +full:- +full:name
20 FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
35 #include <linux/i2c-algo-bit.h>
56 struct intelfb_i2c_chan *chan = data; in intelfb_gpio_setscl() local
57 struct intelfb_info *dinfo = chan->dinfo; in intelfb_gpio_setscl()
60 OUTREG(chan->reg, (state ? SCL_VAL_OUT : 0) | in intelfb_gpio_setscl()
62 val = INREG(chan->reg); in intelfb_gpio_setscl()
67 struct intelfb_i2c_chan *chan = data; in intelfb_gpio_setsda() local
68 struct intelfb_info *dinfo = chan->dinfo; in intelfb_gpio_setsda()
71 OUTREG(chan->reg, (state ? SDA_VAL_OUT : 0) | in intelfb_gpio_setsda()
73 val = INREG(chan->reg); in intelfb_gpio_setsda()
78 struct intelfb_i2c_chan *chan = data; in intelfb_gpio_getscl() local
79 struct intelfb_info *dinfo = chan->dinfo; in intelfb_gpio_getscl()
82 OUTREG(chan->reg, SCL_DIR_MASK); in intelfb_gpio_getscl()
83 OUTREG(chan->reg, 0); in intelfb_gpio_getscl()
84 val = INREG(chan->reg); in intelfb_gpio_getscl()
90 struct intelfb_i2c_chan *chan = data; in intelfb_gpio_getsda() local
91 struct intelfb_info *dinfo = chan->dinfo; in intelfb_gpio_getsda()
94 OUTREG(chan->reg, SDA_DIR_MASK); in intelfb_gpio_getsda()
95 OUTREG(chan->reg, 0); in intelfb_gpio_getsda()
96 val = INREG(chan->reg); in intelfb_gpio_getsda()
101 struct intelfb_i2c_chan *chan, in intelfb_setup_i2c_bus() argument
102 const u32 reg, const char *name, in intelfb_setup_i2c_bus() argument
107 chan->dinfo = dinfo; in intelfb_setup_i2c_bus()
108 chan->reg = reg; in intelfb_setup_i2c_bus()
109 snprintf(chan->adapter.name, sizeof(chan->adapter.name), in intelfb_setup_i2c_bus()
110 "intelfb %s", name); in intelfb_setup_i2c_bus()
111 chan->adapter.class = class; in intelfb_setup_i2c_bus()
112 chan->adapter.owner = THIS_MODULE; in intelfb_setup_i2c_bus()
113 chan->adapter.algo_data = &chan->algo; in intelfb_setup_i2c_bus()
114 chan->adapter.dev.parent = &chan->dinfo->pdev->dev; in intelfb_setup_i2c_bus()
115 chan->algo.setsda = intelfb_gpio_setsda; in intelfb_setup_i2c_bus()
116 chan->algo.setscl = intelfb_gpio_setscl; in intelfb_setup_i2c_bus()
117 chan->algo.getsda = intelfb_gpio_getsda; in intelfb_setup_i2c_bus()
118 chan->algo.getscl = intelfb_gpio_getscl; in intelfb_setup_i2c_bus()
119 chan->algo.udelay = 40; in intelfb_setup_i2c_bus()
120 chan->algo.timeout = 20; in intelfb_setup_i2c_bus()
121 chan->algo.data = chan; in intelfb_setup_i2c_bus()
123 i2c_set_adapdata(&chan->adapter, chan); in intelfb_setup_i2c_bus()
126 intelfb_gpio_setsda(chan, 1); in intelfb_setup_i2c_bus()
127 intelfb_gpio_setscl(chan, 1); in intelfb_setup_i2c_bus()
130 rc = i2c_bit_add_bus(&chan->adapter); in intelfb_setup_i2c_bus()
132 DBG_MSG("I2C bus %s registered.\n", name); in intelfb_setup_i2c_bus()
134 WRN_MSG("Failed to register I2C bus %s.\n", name); in intelfb_setup_i2c_bus()
143 dinfo->num_outputs = 1; in intelfb_create_i2c_busses()
144 dinfo->output[i].type = INTELFB_OUTPUT_ANALOG; in intelfb_create_i2c_busses()
147 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOA, in intelfb_create_i2c_busses()
152 - this function is very incomplete in intelfb_create_i2c_busses()
153 - i915GM has LVDS and TVOUT for example in intelfb_create_i2c_busses()
155 switch(dinfo->chipset) { in intelfb_create_i2c_busses()
161 dinfo->output[i].type = INTELFB_OUTPUT_DVO; in intelfb_create_i2c_busses()
162 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, in intelfb_create_i2c_busses()
164 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, in intelfb_create_i2c_busses()
170 /* has some LVDS + tv-out */ in intelfb_create_i2c_busses()
176 /* SDVO ports have a single control bus - 2 devices */ in intelfb_create_i2c_busses()
177 dinfo->output[i].type = INTELFB_OUTPUT_SDVO; in intelfb_create_i2c_busses()
178 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, in intelfb_create_i2c_busses()
185 dinfo->output[i].type = INTELFB_OUTPUT_SDVO; in intelfb_create_i2c_busses()
186 dinfo->output[i].i2c_bus = dinfo->output[i - 1].i2c_bus; in intelfb_create_i2c_busses()
192 dinfo->num_outputs = i; in intelfb_create_i2c_busses()
200 if (dinfo->output[i].i2c_bus.dinfo) { in intelfb_delete_i2c_busses()
201 i2c_del_adapter(&dinfo->output[i].i2c_bus.adapter); in intelfb_delete_i2c_busses()
202 dinfo->output[i].i2c_bus.dinfo = NULL; in intelfb_delete_i2c_busses()
204 if (dinfo->output[i].ddc_bus.dinfo) { in intelfb_delete_i2c_busses()
205 i2c_del_adapter(&dinfo->output[i].ddc_bus.adapter); in intelfb_delete_i2c_busses()
206 dinfo->output[i].ddc_bus.dinfo = NULL; in intelfb_delete_i2c_busses()