• Home
  • Raw
  • Download

Lines Matching refs:chan

25 	struct gma_i2c_chan *chan = data;  in get_clock()  local
26 struct drm_device *dev = chan->drm_dev; in get_clock()
29 val = REG_READ(chan->reg); in get_clock()
35 struct gma_i2c_chan *chan = data; in get_data() local
36 struct drm_device *dev = chan->drm_dev; in get_data()
39 val = REG_READ(chan->reg); in get_data()
45 struct gma_i2c_chan *chan = data; in set_clock() local
46 struct drm_device *dev = chan->drm_dev; in set_clock()
51 REG_READ(chan->reg) & (GPIO_DATA_PULLUP_DISABLE | in set_clock()
59 REG_WRITE(chan->reg, reserved | clock_bits); in set_clock()
65 struct gma_i2c_chan *chan = data; in set_data() local
66 struct drm_device *dev = chan->drm_dev; in set_data()
71 REG_READ(chan->reg) & (GPIO_DATA_PULLUP_DISABLE | in set_data()
81 REG_WRITE(chan->reg, reserved | data_bits); in set_data()
108 struct gma_i2c_chan *chan; in gma_i2c_create() local
110 chan = kzalloc(sizeof(struct gma_i2c_chan), GFP_KERNEL); in gma_i2c_create()
111 if (!chan) in gma_i2c_create()
114 chan->drm_dev = dev; in gma_i2c_create()
115 chan->reg = reg; in gma_i2c_create()
116 snprintf(chan->base.name, I2C_NAME_SIZE, "intel drm %s", name); in gma_i2c_create()
117 chan->base.owner = THIS_MODULE; in gma_i2c_create()
118 chan->base.algo_data = &chan->algo; in gma_i2c_create()
119 chan->base.dev.parent = dev->dev; in gma_i2c_create()
120 chan->algo.setsda = set_data; in gma_i2c_create()
121 chan->algo.setscl = set_clock; in gma_i2c_create()
122 chan->algo.getsda = get_data; in gma_i2c_create()
123 chan->algo.getscl = get_clock; in gma_i2c_create()
124 chan->algo.udelay = 20; in gma_i2c_create()
125 chan->algo.timeout = usecs_to_jiffies(2200); in gma_i2c_create()
126 chan->algo.data = chan; in gma_i2c_create()
128 i2c_set_adapdata(&chan->base, chan); in gma_i2c_create()
130 if (i2c_bit_add_bus(&chan->base)) in gma_i2c_create()
134 set_data(chan, 1); in gma_i2c_create()
135 set_clock(chan, 1); in gma_i2c_create()
138 return chan; in gma_i2c_create()
141 kfree(chan); in gma_i2c_create()
151 void gma_i2c_destroy(struct gma_i2c_chan *chan) in gma_i2c_destroy() argument
153 if (!chan) in gma_i2c_destroy()
156 i2c_del_adapter(&chan->base); in gma_i2c_destroy()
157 kfree(chan); in gma_i2c_destroy()