Lines Matching +full:0 +full:xe0
46 char buf[] = { (reg >> 8) | 0x80, reg & 0xff, data }; in au8522_rc_write()
47 struct i2c_msg msg = { .addr = ir->i2c_dev_addr, .flags = 0, in au8522_rc_write()
52 if (rc < 0) in au8522_rc_write()
55 return (rc == 1) ? 0 : -EIO; in au8522_rc_write()
63 struct i2c_msg msg[2] = { { .addr = ir->i2c_dev_addr, .flags = 0, in au8522_rc_read()
68 obuf[0] = 0x40 | reg >> 8; in au8522_rc_read()
69 obuf[1] = reg & 0xff; in au8522_rc_read()
70 if (val >= 0) { in au8522_rc_read()
72 msg[0].len++; in au8522_rc_read()
77 if (rc < 0) in au8522_rc_read()
80 return (rc == 2) ? 0 : -EIO; in au8522_rc_read()
89 if (rc < 0) in au8522_rc_andor()
97 return 0; in au8522_rc_andor()
103 #define au8522_rc_clear(ir, reg, bit) au8522_rc_andor(ir, (reg), (bit), 0)
123 return 0; in au0828_get_key_au8522()
126 rc = au8522_rc_read(ir, 0xe1, -1, buf, 1); in au0828_get_key_au8522()
127 if (rc < 0 || !(buf[0] & (1 << 4))) { in au0828_get_key_au8522()
129 au8522_rc_set(ir, 0xe0, 1 << 4); in au0828_get_key_au8522()
130 return 0; in au0828_get_key_au8522()
134 rc = au8522_rc_read(ir, 0xe3, 0x11, buf, sizeof(buf)); in au0828_get_key_au8522()
137 if (rc < 0) in au0828_get_key_au8522()
141 au8522_rc_clear(ir, 0xe0, 1 << 4); in au0828_get_key_au8522()
144 au8522_rc_set(ir, 0xe0, 1 << 4); in au0828_get_key_au8522()
148 prv_bit = (buf[0] >> 7) & 0x01; in au0828_get_key_au8522()
149 width = 0; in au0828_get_key_au8522()
150 for (i = 0; i < sizeof(buf); i++) { in au0828_get_key_au8522()
151 for (j = 7; j >= 0; j--) { in au0828_get_key_au8522()
152 bit = (buf[i] >> j) & 0x01; in au0828_get_key_au8522()
222 if (rc < 0) in au0828_rc_work()
235 au8522_rc_set(ir, 0xe0, 1 << 4); in au0828_rc_start()
239 return 0; in au0828_rc_start()
251 au8522_rc_clear(ir, 0xe0, 1 << 4); in au0828_rc_stop()
257 int i = 0; in au0828_probe_i2c_ir()
259 0x47, I2C_CLIENT_END in au0828_probe_i2c_ir()
277 u16 i2c_rc_dev_addr = 0; in au0828_rc_register()
280 return 0; in au0828_rc_register()
342 return 0; in au0828_rc_register()
371 return 0; in au0828_rc_suspend()
378 au8522_rc_clear(ir, 0xe0, 1 << 4); in au0828_rc_suspend()
380 return 0; in au0828_rc_suspend()
388 return 0; in au0828_rc_resume()
393 au8522_rc_set(ir, 0xe0, 1 << 4); in au0828_rc_resume()
397 return 0; in au0828_rc_resume()