Lines Matching refs:resp
175 struct atsha204a_resp *resp) in atsha204a_recv_resp() argument
179 u8 *p = (u8 *) resp; in atsha204a_recv_resp()
185 if (resp->length > 4) { in atsha204a_recv_resp()
186 if (resp->length > sizeof(*resp)) in atsha204a_recv_resp()
189 res = atsha204a_recv(dev, p + 4, resp->length - 4); in atsha204a_recv_resp()
194 resp_crc = (u16) p[resp->length - 2] in atsha204a_recv_resp()
195 | (((u16) p[resp->length - 1]) << 8); in atsha204a_recv_resp()
196 computed_crc = atsha204a_crc16(p, resp->length - 2); in atsha204a_recv_resp()
209 struct atsha204a_resp resp; in atsha204a_wakeup() local
226 res = atsha204a_recv_resp(dev, &resp); in atsha204a_wakeup()
232 if (resp.code != ATSHA204A_STATUS_AFTER_WAKE) { in atsha204a_wakeup()
234 resp.code); in atsha204a_wakeup()
268 struct atsha204a_resp *resp) in atsha204a_transaction() argument
279 res = atsha204a_recv_resp(dev, resp); in atsha204a_transaction()
315 struct atsha204a_resp resp; in atsha204a_read() local
330 res = atsha204a_transaction(dev, &req, &resp); in atsha204a_read()
344 if (resp.length != (read32 ? 32 : 4) + 3) { in atsha204a_read()
346 resp.length); in atsha204a_read()
350 memcpy(buffer, ((u8 *) &resp) + 1, read32 ? 32 : 4); in atsha204a_read()
359 struct atsha204a_resp resp; in atsha204a_get_random() local
372 res = atsha204a_transaction(dev, &req, &resp); in atsha204a_get_random()
378 memcpy(buffer, ((u8 *) &resp) + 1, max >= 32 ? 32 : max); in atsha204a_get_random()