Lines Matching refs:res

43 	int res = tb_eeprom_ctl_read(sw, &ctl);  in tb_eeprom_active()  local
44 if (res) in tb_eeprom_active()
45 return res; in tb_eeprom_active()
48 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
49 if (res) in tb_eeprom_active()
50 return res; in tb_eeprom_active()
55 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
56 if (res) in tb_eeprom_active()
57 return res; in tb_eeprom_active()
72 int res; in tb_eeprom_transfer() local
74 res = tb_eeprom_ctl_write(sw, ctl); in tb_eeprom_transfer()
75 if (res) in tb_eeprom_transfer()
76 return res; in tb_eeprom_transfer()
79 res = tb_eeprom_ctl_write(sw, ctl); in tb_eeprom_transfer()
80 if (res) in tb_eeprom_transfer()
81 return res; in tb_eeprom_transfer()
83 res = tb_eeprom_ctl_read(sw, ctl); in tb_eeprom_transfer()
84 if (res) in tb_eeprom_transfer()
85 return res; in tb_eeprom_transfer()
98 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_out() local
99 if (res) in tb_eeprom_out()
100 return res; in tb_eeprom_out()
103 res = tb_eeprom_transfer(sw, &ctl, TB_EEPROM_OUT); in tb_eeprom_out()
104 if (res) in tb_eeprom_out()
105 return res; in tb_eeprom_out()
118 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_in() local
119 if (res) in tb_eeprom_in()
120 return res; in tb_eeprom_in()
124 res = tb_eeprom_transfer(sw, &ctl, TB_EEPROM_IN); in tb_eeprom_in()
125 if (res) in tb_eeprom_in()
126 return res; in tb_eeprom_in()
138 int i, res; in tb_eeprom_read_n() local
139 res = tb_eeprom_active(sw, true); in tb_eeprom_read_n()
140 if (res) in tb_eeprom_read_n()
141 return res; in tb_eeprom_read_n()
142 res = tb_eeprom_out(sw, 3); in tb_eeprom_read_n()
143 if (res) in tb_eeprom_read_n()
144 return res; in tb_eeprom_read_n()
145 res = tb_eeprom_out(sw, offset >> 8); in tb_eeprom_read_n()
146 if (res) in tb_eeprom_read_n()
147 return res; in tb_eeprom_read_n()
148 res = tb_eeprom_out(sw, offset); in tb_eeprom_read_n()
149 if (res) in tb_eeprom_read_n()
150 return res; in tb_eeprom_read_n()
152 res = tb_eeprom_in(sw, val + i); in tb_eeprom_read_n()
153 if (res) in tb_eeprom_read_n()
154 return res; in tb_eeprom_read_n()
246 int res; in tb_eeprom_get_drom_offset() local
251 res = tb_sw_read(sw, &cap, TB_CFG_SWITCH, sw->cap_plug_events, in tb_eeprom_get_drom_offset()
253 if (res) in tb_eeprom_get_drom_offset()
254 return res; in tb_eeprom_get_drom_offset()
281 int res = tb_eeprom_get_drom_offset(sw, &drom_offset); in tb_drom_read_uid_only() local
282 if (res) in tb_drom_read_uid_only()
283 return res; in tb_drom_read_uid_only()
289 res = tb_eeprom_read_n(sw, drom_offset, data, 9); in tb_drom_read_uid_only()
290 if (res) in tb_drom_read_uid_only()
291 return res; in tb_drom_read_uid_only()
334 int res; in tb_drom_parse_entry_port() local
351 res = tb_port_read(port, &type, TB_CFG_PORT, 2, 1); in tb_drom_parse_entry_port()
352 if (res) in tb_drom_parse_entry_port()
353 return res; in tb_drom_parse_entry_port()
382 int res; in tb_drom_parse_entries() local
394 res = tb_drom_parse_entry_generic(sw, entry); in tb_drom_parse_entries()
397 res = tb_drom_parse_entry_port(sw, entry); in tb_drom_parse_entries()
400 if (res) in tb_drom_parse_entries()
401 return res; in tb_drom_parse_entries()
414 int len, res; in tb_drom_copy_efi() local
424 res = device_property_read_u8_array(dev, "ThunderboltDROM", sw->drom, in tb_drom_copy_efi()
426 if (res) in tb_drom_copy_efi()
495 int res; in tb_drom_read() local
534 res = tb_eeprom_get_drom_offset(sw, &drom_offset); in tb_drom_read()
535 if (res) in tb_drom_read()
536 return res; in tb_drom_read()
538 res = tb_eeprom_read_n(sw, drom_offset + 14, (u8 *) &size, 2); in tb_drom_read()
539 if (res) in tb_drom_read()
540 return res; in tb_drom_read()
552 res = tb_eeprom_read_n(sw, drom_offset, sw->drom, size); in tb_drom_read()
553 if (res) in tb_drom_read()