Lines Matching refs:val
96 static int tb_eeprom_out(struct tb_switch *sw, u8 val)
104 ctl.fl_di = val & 0x80;
108 val <<= 1;
116 static int tb_eeprom_in(struct tb_switch *sw, u8 *val)
123 *val = 0;
125 *val <<= 1;
129 *val |= ctl.fl_do;
166 * tb_eeprom_read_n - read count bytes from offset into val
168 static int tb_eeprom_read_n(struct tb_switch *sw, u16 offset, u8 *val,
193 res = tb_eeprom_in(sw, val + i);
203 u8 val = 0xff;
205 val ^= data[i];
207 val = (val << 1) ^ ((val & 0x80) ? 7 : 0);
209 return val;