Lines Matching refs:res

45 	int res = tb_eeprom_ctl_read(sw, &ctl);  in tb_eeprom_active()  local
46 if (res) in tb_eeprom_active()
47 return res; in tb_eeprom_active()
50 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
51 if (res) in tb_eeprom_active()
52 return res; in tb_eeprom_active()
57 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
58 if (res) in tb_eeprom_active()
59 return res; in tb_eeprom_active()
74 int res; in tb_eeprom_transfer() local
76 res = tb_eeprom_ctl_write(sw, ctl); in tb_eeprom_transfer()
77 if (res) in tb_eeprom_transfer()
78 return res; in tb_eeprom_transfer()
81 res = tb_eeprom_ctl_write(sw, ctl); in tb_eeprom_transfer()
82 if (res) in tb_eeprom_transfer()
83 return res; in tb_eeprom_transfer()
85 res = tb_eeprom_ctl_read(sw, ctl); in tb_eeprom_transfer()
86 if (res) in tb_eeprom_transfer()
87 return res; in tb_eeprom_transfer()
100 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_out() local
101 if (res) in tb_eeprom_out()
102 return res; in tb_eeprom_out()
105 res = tb_eeprom_transfer(sw, &ctl, TB_EEPROM_OUT); in tb_eeprom_out()
106 if (res) in tb_eeprom_out()
107 return res; in tb_eeprom_out()
120 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_in() local
121 if (res) in tb_eeprom_in()
122 return res; in tb_eeprom_in()
126 res = tb_eeprom_transfer(sw, &ctl, TB_EEPROM_IN); in tb_eeprom_in()
127 if (res) in tb_eeprom_in()
128 return res; in tb_eeprom_in()
140 int res; in tb_eeprom_get_drom_offset() local
146 res = tb_sw_read(sw, &cap, TB_CFG_SWITCH, sw->cap_plug_events, in tb_eeprom_get_drom_offset()
148 if (res) in tb_eeprom_get_drom_offset()
149 return res; in tb_eeprom_get_drom_offset()
172 int i, res; in tb_eeprom_read_n() local
174 res = tb_eeprom_get_drom_offset(sw, &drom_offset); in tb_eeprom_read_n()
175 if (res) in tb_eeprom_read_n()
176 return res; in tb_eeprom_read_n()
180 res = tb_eeprom_active(sw, true); in tb_eeprom_read_n()
181 if (res) in tb_eeprom_read_n()
182 return res; in tb_eeprom_read_n()
183 res = tb_eeprom_out(sw, 3); in tb_eeprom_read_n()
184 if (res) in tb_eeprom_read_n()
185 return res; in tb_eeprom_read_n()
186 res = tb_eeprom_out(sw, offset >> 8); in tb_eeprom_read_n()
187 if (res) in tb_eeprom_read_n()
188 return res; in tb_eeprom_read_n()
189 res = tb_eeprom_out(sw, offset); in tb_eeprom_read_n()
190 if (res) in tb_eeprom_read_n()
191 return res; in tb_eeprom_read_n()
193 res = tb_eeprom_in(sw, val + i); in tb_eeprom_read_n()
194 if (res) in tb_eeprom_read_n()
195 return res; in tb_eeprom_read_n()
306 int res; in tb_drom_read_uid_only() local
309 res = tb_eeprom_read_n(sw, 0, data, 9); in tb_drom_read_uid_only()
310 if (res) in tb_drom_read_uid_only()
311 return res; in tb_drom_read_uid_only()
364 int res; in tb_drom_parse_entry_port() local
381 res = tb_port_read(port, &type, TB_CFG_PORT, 2, 1); in tb_drom_parse_entry_port()
382 if (res) in tb_drom_parse_entry_port()
383 return res; in tb_drom_parse_entry_port()
412 int res; in tb_drom_parse_entries() local
424 res = tb_drom_parse_entry_generic(sw, entry); in tb_drom_parse_entries()
427 res = tb_drom_parse_entry_port(sw, entry); in tb_drom_parse_entries()
430 if (res) in tb_drom_parse_entries()
431 return res; in tb_drom_parse_entries()
444 int len, res; in tb_drom_copy_efi() local
454 res = device_property_read_u8_array(dev, "ThunderboltDROM", sw->drom, in tb_drom_copy_efi()
456 if (res) in tb_drom_copy_efi()
606 int res, retries = 1; in tb_drom_read() local
643 res = tb_drom_read_n(sw, 14, (u8 *) &size, 2); in tb_drom_read()
644 if (res) in tb_drom_read()
645 return res; in tb_drom_read()
657 res = tb_drom_read_n(sw, 0, sw->drom, size); in tb_drom_read()
658 if (res) in tb_drom_read()
673 res = usb4_drom_parse(sw); in tb_drom_read()
680 res = tb_drom_parse(sw); in tb_drom_read()
685 if (res == -EILSEQ && retries--) { in tb_drom_read()
688 res = tb_drom_read_n(sw, 0, sw->drom, size); in tb_drom_read()
689 if (!res) in tb_drom_read()
693 if (!res) in tb_drom_read()