Lines Matching defs:data
93 static void rtl8366_smi_write_bits(struct rtl8366_smi *smi, u32 data, u32 len)
101 /* prepare data */
102 gpio_set_value(sda, !!(data & ( 1 << (len - 1))));
112 static void rtl8366_smi_read_bits(struct rtl8366_smi *smi, u32 len, u32 *data)
119 for (*data = 0; len > 0; len--) {
130 *data |= (u << (len - 1));
157 static int rtl8366_smi_write_byte(struct rtl8366_smi *smi, u8 data)
159 rtl8366_smi_write_bits(smi, data, 8);
163 static int rtl8366_smi_write_byte_noack(struct rtl8366_smi *smi, u8 data)
165 rtl8366_smi_write_bits(smi, data, 8);
169 static int rtl8366_smi_read_byte0(struct rtl8366_smi *smi, u8 *data)
173 /* read data */
175 *data = (t & 0xff);
183 static int rtl8366_smi_read_byte1(struct rtl8366_smi *smi, u8 *data)
187 /* read data */
189 *data = (t & 0xff);
197 int rtl8366_smi_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data)
228 *data = ((u32) lo) | (((u32) hi) << 8);
241 u32 addr, u32 data, bool ack)
266 ret = rtl8366_smi_write_byte(smi, data & 0xff);
272 ret = rtl8366_smi_write_byte(smi, data >> 8);
274 ret = rtl8366_smi_write_byte_noack(smi, data >> 8);
287 int rtl8366_smi_write_reg(struct rtl8366_smi *smi, u32 addr, u32 data)
289 return __rtl8366_smi_write_reg(smi, addr, data, true);
293 int rtl8366_smi_write_reg_noack(struct rtl8366_smi *smi, u32 addr, u32 data)
295 return __rtl8366_smi_write_reg(smi, addr, data, false);
299 int rtl8366_smi_rmwr(struct rtl8366_smi *smi, u32 addr, u32 mask, u32 data)
308 err = rtl8366_smi_write_reg(smi, addr, (t & ~mask) | data);
726 unsigned long data;
743 if (strict_strtoul(buf, 16, &data)) {
746 err = rtl8366_smi_write_reg(smi, reg, data);
750 reg, data);
1224 dev_err(parent, "no memory for private data\n");