Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Side by Side Diff: drivers/tpm/slb9635_i2c/ifx_v05.c

Issue 6683023: Add Infineon v05 TPM driver (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/u-boot-next.git@chromeos-v2010.09
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 #include <config.h>
7 #include <common.h>
8 #include <i2c.h>
9 #include "tddl.h"
10
11 int tpm_init_v05(void)
12 {
13 return i2c_probe(0x20);
14 }
15
16 int tpm_open_v05(void)
17 {
18 if (TDDL_Open())
19 return -1;
20 return 0;
21 }
22
23 int tpm_close_v05(void)
24 {
25 if (TDDL_Close())
26 return -1;
27 return 0;
28 }
29
30 int tpm_sendrecv_v05(const uint8_t *sendbuf, size_t buf_size,
31 uint8_t *recvbuf, size_t *recv_len)
32 {
33 if (TDDL_TransmitData((uint8_t*)sendbuf, (uint32_t)buf_size, recvbuf,
34 (uint32_t*)recv_len))
35 return -1;
36 return 0;
37 }
38
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698