#include <linux/acpi.h>
#include "tpm.h"
#define TPM_PPI_REVISION_ID_1 …
#define TPM_PPI_REVISION_ID_2 …
#define TPM_PPI_FN_VERSION …
#define TPM_PPI_FN_SUBREQ …
#define TPM_PPI_FN_GETREQ …
#define TPM_PPI_FN_GETACT …
#define TPM_PPI_FN_GETRSP …
#define TPM_PPI_FN_SUBREQ2 …
#define TPM_PPI_FN_GETOPR …
#define PPI_TPM_REQ_MAX …
#define PPI_VS_REQ_START …
#define PPI_VS_REQ_END …
static const guid_t tpm_ppi_guid = …;
static bool tpm_ppi_req_has_parameter(u64 req)
{ … }
static inline union acpi_object *
tpm_eval_dsm(acpi_handle ppi_handle, int func, acpi_object_type type,
union acpi_object *argv4, u64 rev)
{ … }
static ssize_t tpm_show_ppi_version(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t tpm_show_ppi_request(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t tpm_store_ppi_request(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t tpm_show_ppi_transition_action(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t tpm_show_ppi_response(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t show_ppi_operations(acpi_handle dev_handle, char *buf, u32 start,
u32 end)
{ … }
static ssize_t tpm_show_ppi_tcg_operations(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t tpm_show_ppi_vs_operations(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR(version, S_IRUGO, tpm_show_ppi_version, NULL);
static DEVICE_ATTR(request, S_IRUGO | S_IWUSR | S_IWGRP,
tpm_show_ppi_request, tpm_store_ppi_request);
static DEVICE_ATTR(transition_action, S_IRUGO,
tpm_show_ppi_transition_action, NULL);
static DEVICE_ATTR(response, S_IRUGO, tpm_show_ppi_response, NULL);
static DEVICE_ATTR(tcg_operations, S_IRUGO, tpm_show_ppi_tcg_operations, NULL);
static DEVICE_ATTR(vs_operations, S_IRUGO, tpm_show_ppi_vs_operations, NULL);
static struct attribute *ppi_attrs[] = …;
static const struct attribute_group ppi_attr_grp = …;
void tpm_add_ppi(struct tpm_chip *chip)
{ … }