Lines Matching defs:state
24 static void vp3054_bit_setscl(void *data, int state)
30 if (state) {
31 vp3054_i2c->state |= 0x0001; /* SCL high */
32 vp3054_i2c->state &= ~0x0100; /* external pullup */
34 vp3054_i2c->state &= ~0x0001; /* SCL low */
35 vp3054_i2c->state |= 0x0100; /* drive pin */
37 cx_write(MO_GP0_IO, 0x010000 | vp3054_i2c->state);
41 static void vp3054_bit_setsda(void *data, int state)
47 if (state) {
48 vp3054_i2c->state |= 0x0002; /* SDA high */
49 vp3054_i2c->state &= ~0x0200; /* tristate pin */
51 vp3054_i2c->state &= ~0x0002; /* SDA low */
52 vp3054_i2c->state |= 0x0200; /* drive pin */
54 cx_write(MO_GP0_IO, 0x020000 | vp3054_i2c->state);
62 u32 state;
64 state = cx_read(MO_GP0_IO);
65 return (state & 0x01) ? 1 : 0;
72 u32 state;
74 state = cx_read(MO_GP0_IO);
75 return (state & 0x02) ? 1 : 0;