Lines Matching refs:res
44 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_active() local
45 if (res) in tb_eeprom_active()
46 return res; in tb_eeprom_active()
49 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
50 if (res) in tb_eeprom_active()
51 return res; in tb_eeprom_active()
56 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
57 if (res) in tb_eeprom_active()
58 return res; in tb_eeprom_active()
73 int res; in tb_eeprom_transfer() local
75 res = tb_eeprom_ctl_write(sw, ctl); in tb_eeprom_transfer()
76 if (res) in tb_eeprom_transfer()
77 return res; in tb_eeprom_transfer()
80 res = tb_eeprom_ctl_write(sw, ctl); in tb_eeprom_transfer()
81 if (res) in tb_eeprom_transfer()
82 return res; in tb_eeprom_transfer()
84 res = tb_eeprom_ctl_read(sw, ctl); in tb_eeprom_transfer()
85 if (res) in tb_eeprom_transfer()
86 return res; in tb_eeprom_transfer()
99 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_out() local
100 if (res) in tb_eeprom_out()
101 return res; in tb_eeprom_out()
104 res = tb_eeprom_transfer(sw, &ctl, TB_EEPROM_OUT); in tb_eeprom_out()
105 if (res) in tb_eeprom_out()
106 return res; in tb_eeprom_out()
119 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_in() local
120 if (res) in tb_eeprom_in()
121 return res; in tb_eeprom_in()
125 res = tb_eeprom_transfer(sw, &ctl, TB_EEPROM_IN); in tb_eeprom_in()
126 if (res) in tb_eeprom_in()
127 return res; in tb_eeprom_in()
139 int i, res; in tb_eeprom_read_n() local
140 res = tb_eeprom_active(sw, true); in tb_eeprom_read_n()
141 if (res) in tb_eeprom_read_n()
142 return res; in tb_eeprom_read_n()
143 res = tb_eeprom_out(sw, 3); in tb_eeprom_read_n()
144 if (res) in tb_eeprom_read_n()
145 return res; in tb_eeprom_read_n()
146 res = tb_eeprom_out(sw, offset >> 8); in tb_eeprom_read_n()
147 if (res) in tb_eeprom_read_n()
148 return res; in tb_eeprom_read_n()
149 res = tb_eeprom_out(sw, offset); in tb_eeprom_read_n()
150 if (res) in tb_eeprom_read_n()
151 return res; in tb_eeprom_read_n()
153 res = tb_eeprom_in(sw, val + i); in tb_eeprom_read_n()
154 if (res) in tb_eeprom_read_n()
155 return res; in tb_eeprom_read_n()
247 int res; in tb_eeprom_get_drom_offset() local
252 res = tb_sw_read(sw, &cap, TB_CFG_SWITCH, sw->cap_plug_events, in tb_eeprom_get_drom_offset()
254 if (res) in tb_eeprom_get_drom_offset()
255 return res; in tb_eeprom_get_drom_offset()
282 int res = tb_eeprom_get_drom_offset(sw, &drom_offset); in tb_drom_read_uid_only() local
283 if (res) in tb_drom_read_uid_only()
284 return res; in tb_drom_read_uid_only()
290 res = tb_eeprom_read_n(sw, drom_offset, data, 9); in tb_drom_read_uid_only()
291 if (res) in tb_drom_read_uid_only()
292 return res; in tb_drom_read_uid_only()
335 int res; in tb_drom_parse_entry_port() local
352 res = tb_port_read(port, &type, TB_CFG_PORT, 2, 1); in tb_drom_parse_entry_port()
353 if (res) in tb_drom_parse_entry_port()
354 return res; in tb_drom_parse_entry_port()
383 int res; in tb_drom_parse_entries() local
395 res = tb_drom_parse_entry_generic(sw, entry); in tb_drom_parse_entries()
398 res = tb_drom_parse_entry_port(sw, entry); in tb_drom_parse_entries()
401 if (res) in tb_drom_parse_entries()
402 return res; in tb_drom_parse_entries()
415 int len, res; in tb_drom_copy_efi() local
425 res = device_property_read_u8_array(dev, "ThunderboltDROM", sw->drom, in tb_drom_copy_efi()
427 if (res) in tb_drom_copy_efi()
496 int res; in tb_drom_read() local
531 res = tb_eeprom_get_drom_offset(sw, &drom_offset); in tb_drom_read()
532 if (res) in tb_drom_read()
533 return res; in tb_drom_read()
535 res = tb_eeprom_read_n(sw, drom_offset + 14, (u8 *) &size, 2); in tb_drom_read()
536 if (res) in tb_drom_read()
537 return res; in tb_drom_read()
549 res = tb_eeprom_read_n(sw, drom_offset, sw->drom, size); in tb_drom_read()
550 if (res) in tb_drom_read()