Lines Matching refs:vp3054_i2c
44 struct vp3054_i2c_state *vp3054_i2c = dev->vp3054;
47 vp3054_i2c->state |= 0x0001; /* SCL high */
48 vp3054_i2c->state &= ~0x0100; /* external pullup */
50 vp3054_i2c->state &= ~0x0001; /* SCL low */
51 vp3054_i2c->state |= 0x0100; /* drive pin */
53 cx_write(MO_GP0_IO, 0x010000 | vp3054_i2c->state);
61 struct vp3054_i2c_state *vp3054_i2c = dev->vp3054;
64 vp3054_i2c->state |= 0x0002; /* SDA high */
65 vp3054_i2c->state &= ~0x0200; /* tristate pin */
67 vp3054_i2c->state &= ~0x0002; /* SDA low */
68 vp3054_i2c->state |= 0x0200; /* drive pin */
70 cx_write(MO_GP0_IO, 0x020000 | vp3054_i2c->state);
110 struct vp3054_i2c_state *vp3054_i2c;
116 vp3054_i2c = kzalloc(sizeof(*vp3054_i2c), GFP_KERNEL);
117 if (vp3054_i2c == NULL)
119 dev->vp3054 = vp3054_i2c;
121 memcpy(&vp3054_i2c->algo, &vp3054_i2c_algo_template,
122 sizeof(vp3054_i2c->algo));
124 vp3054_i2c->adap.class |= I2C_CLASS_TV_DIGITAL;
126 vp3054_i2c->adap.dev.parent = &dev->pci->dev;
127 strlcpy(vp3054_i2c->adap.name, core->name,
128 sizeof(vp3054_i2c->adap.name));
129 vp3054_i2c->adap.owner = THIS_MODULE;
130 vp3054_i2c->adap.id = I2C_HW_B_CX2388x;
131 vp3054_i2c->algo.data = dev;
132 i2c_set_adapdata(&vp3054_i2c->adap, dev);
133 vp3054_i2c->adap.algo_data = &vp3054_i2c->algo;
138 rc = i2c_bit_add_bus(&vp3054_i2c->adap);
140 printk("%s: vp3054_i2c register FAILED\n", core->name);
151 struct vp3054_i2c_state *vp3054_i2c = dev->vp3054;
153 if (vp3054_i2c == NULL ||
157 i2c_del_adapter(&vp3054_i2c->adap);
158 kfree(vp3054_i2c);