blob: f3c21cb69837946b0e57e11eaa1b0e01a8adf0bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* SPDX-License-Identifier: GPL-2.0-only */
#include <baseboard/variants.h>
#include <soc/pci_devs.h>
#include <acpi/acpi_device.h>
#include <static.h>
/*
* This function runs only on the volteer_ti50 variant, which has the GSC on a
* reworked I2C bus.
*/
static void devtree_enable_i2c_tpm(void)
{
struct device *spi_tpm = DEV_PTR(spi_tpm);
struct device *i2c_tpm = DEV_PTR(i2c_tpm);
if (!i2c_tpm || !spi_tpm)
return;
spi_tpm->enabled = 0;
i2c_tpm->enabled = 1;
}
void variant_devtree_update(void)
{
if (CONFIG(I2C_TPM))
devtree_enable_i2c_tpm();
}
|