Lines Matching defs:state
40 static void vp3054_bit_setscl(void *data, int state)
46 if (state) {
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);
57 static void vp3054_bit_setsda(void *data, int state)
63 if (state) {
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);
78 u32 state;
80 state = cx_read(MO_GP0_IO);
81 return (state & 0x01) ? 1 : 0;
88 u32 state;
90 state = cx_read(MO_GP0_IO);
91 return (state & 0x02) ? 1 : 0;