linux/drivers/char/tpm/st33zp24/st33zp24.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * STMicroelectronics TPM Linux driver for TPM ST33ZP24
 * Copyright (C) 2009 - 2016 STMicroelectronics
 */

#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/freezer.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/gpio/consumer.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/slab.h>

#include "../tpm.h"
#include "st33zp24.h"

#define TPM_ACCESS
#define TPM_STS
#define TPM_DATA_FIFO
#define TPM_INTF_CAPABILITY
#define TPM_INT_STATUS
#define TPM_INT_ENABLE

#define LOCALITY0

enum st33zp24_access {};

enum st33zp24_status {};

enum st33zp24_int_flags {};

enum tis_defaults {};

/*
 * clear the pending interrupt.
 */
static u8 clear_interruption(struct st33zp24_dev *tpm_dev)
{}

/*
 * cancel the current command execution or set STS to COMMAND READY.
 */
static void st33zp24_cancel(struct tpm_chip *chip)
{}

/*
 * return the TPM_STS register
 */
static u8 st33zp24_status(struct tpm_chip *chip)
{}

/*
 * if the locality is active
 */
static bool check_locality(struct tpm_chip *chip)
{}

static int request_locality(struct tpm_chip *chip)
{}

static void release_locality(struct tpm_chip *chip)
{}

/*
 * get_burstcount return the burstcount value
 */
static int get_burstcount(struct tpm_chip *chip)
{}

static bool wait_for_tpm_stat_cond(struct tpm_chip *chip, u8 mask,
				bool check_cancel, bool *canceled)
{}

/*
 * wait for a TPM_STS value
 */
static int wait_for_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout,
			wait_queue_head_t *queue, bool check_cancel)
{}

static int recv_data(struct tpm_chip *chip, u8 *buf, size_t count)
{}

static irqreturn_t tpm_ioserirq_handler(int irq, void *dev_id)
{}

/*
 * send TPM commands through the I2C bus.
 */
static int st33zp24_send(struct tpm_chip *chip, unsigned char *buf,
			 size_t len)
{}

static int st33zp24_recv(struct tpm_chip *chip, unsigned char *buf,
			    size_t count)
{}

static bool st33zp24_req_canceled(struct tpm_chip *chip, u8 status)
{}

static const struct tpm_class_ops st33zp24_tpm =;

static const struct acpi_gpio_params lpcpd_gpios =;

static const struct acpi_gpio_mapping acpi_st33zp24_gpios[] =;

/*
 * initialize the TPM device
 */
int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
		   struct device *dev, int irq)
{}
EXPORT_SYMBOL();

void st33zp24_remove(struct tpm_chip *chip)
{}
EXPORT_SYMBOL();

#ifdef CONFIG_PM_SLEEP
int st33zp24_pm_suspend(struct device *dev)
{}
EXPORT_SYMBOL();

int st33zp24_pm_resume(struct device *dev)
{}
EXPORT_SYMBOL();
#endif

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_VERSION();
MODULE_LICENSE();