Lines Matching +full:0 +full:x54
20 #define CTRL_READ_REQUEST 0xb8
21 #define CTRL_WRITE_REQUEST 0x38
23 #define REQTYPE_I2C_READ 0xb1
24 #define REQTYPE_I2C_WRITE 0xb0
25 #define REQTYPE_I2C_WRITE_STATT 0xd0
27 #define Z8F0811_IR_TX_I2C_ADDR 0x70
28 #define Z8F0811_IR_RX_I2C_ADDR 0x71
61 ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), in hdpvr_i2c_read()
63 (bus << 8) | addr, 0, dev->i2c_buf, in hdpvr_i2c_read()
65 if (ret < 0) in hdpvr_i2c_read()
69 ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), in hdpvr_i2c_read()
71 (bus << 8) | addr, 0, dev->i2c_buf, len, 1000); in hdpvr_i2c_read()
75 ret = 0; in hdpvr_i2c_read()
76 } else if (ret >= 0) in hdpvr_i2c_read()
91 ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), in hdpvr_i2c_write()
93 (bus << 8) | addr, 0, dev->i2c_buf, len, 1000); in hdpvr_i2c_write()
95 if (ret < 0) in hdpvr_i2c_write()
98 ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), in hdpvr_i2c_write()
100 0, 0, dev->i2c_buf, 2, 1000); in hdpvr_i2c_write()
103 ret = 0; in hdpvr_i2c_write()
104 else if (ret >= 0) in hdpvr_i2c_write()
114 int retval = 0, addr; in hdpvr_transfer()
118 addr = msgs[0].addr << 1; in hdpvr_transfer()
121 if (msgs[0].flags & I2C_M_RD) in hdpvr_transfer()
122 retval = hdpvr_i2c_read(dev, 1, addr, NULL, 0, in hdpvr_transfer()
123 msgs[0].buf, msgs[0].len); in hdpvr_transfer()
125 retval = hdpvr_i2c_write(dev, 1, addr, msgs[0].buf, in hdpvr_transfer()
126 msgs[0].len); in hdpvr_transfer()
128 if (msgs[0].addr != msgs[1].addr) { in hdpvr_transfer()
134 if ((msgs[0].flags & I2C_M_RD) || !(msgs[1].flags & I2C_M_RD)) { in hdpvr_transfer()
136 msgs[0].flags & I2C_M_RD, in hdpvr_transfer()
146 retval = hdpvr_i2c_read(dev, 1, addr, msgs[0].buf, msgs[0].len, in hdpvr_transfer()
180 hdpvr_i2c_read(dev, 0, 0x54, NULL, 0, buffer, 1); in hdpvr_activate_ir()
182 buffer[0] = 0; in hdpvr_activate_ir()
183 buffer[1] = 0x8; in hdpvr_activate_ir()
184 hdpvr_i2c_write(dev, 1, 0x54, buffer, 2); in hdpvr_activate_ir()
186 buffer[1] = 0x18; in hdpvr_activate_ir()
187 hdpvr_i2c_write(dev, 1, 0x54, buffer, 2); in hdpvr_activate_ir()
191 return 0; in hdpvr_activate_ir()