コード例 #1
0
ファイル: tis_i2c.c プロジェクト: jpl888/coreboot
int tis_open(void)
{
	opened = 1;
	if (tpm_open(bus, CONFIG_DRIVER_TPM_I2C_ADDR)) {
		opened = 0;
		return -1;
	}
	return 0;
}
コード例 #2
0
ファイル: tis_i2c.c プロジェクト: yytang2012/u-boot-arm
int tis_open(void)
{
	int rc;

	if (!tpm.inited)
		return -1;

	if (tpm_select())
		return -1;

	rc = tpm_open(tpm.slave_addr);

	tpm_deselect();

	return rc;
}