linux/drivers/char/tpm/tpm_i2c_atmel.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * ATMEL I2C TPM AT97SC3204T
 *
 * Copyright (C) 2012 V Lab Technologies
 *  Teddy Reed <[email protected]>
 * Copyright (C) 2013, Obsidian Research Corp.
 *  Jason Gunthorpe <[email protected]>
 * Device driver for ATMEL I2C TPMs.
 *
 * Teddy Reed determined the basic I2C command flow, unlike other I2C TPM
 * devices the raw TCG formatted TPM command data is written via I2C and then
 * raw TCG formatted TPM command data is returned via I2C.
 *
 * TGC status/locality/etc functions seen in the LPC implementation do not
 * seem to be present.
 */
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include "tpm.h"

#define I2C_DRIVER_NAME

#define TPM_I2C_SHORT_TIMEOUT
#define TPM_I2C_LONG_TIMEOUT

#define ATMEL_STS_OK

struct priv_data {};

static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len)
{}

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

static void i2c_atmel_cancel(struct tpm_chip *chip)
{}

static u8 i2c_atmel_read_status(struct tpm_chip *chip)
{}

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

static const struct tpm_class_ops i2c_atmel =;

static int i2c_atmel_probe(struct i2c_client *client)
{}

static void i2c_atmel_remove(struct i2c_client *client)
{}

static const struct i2c_device_id i2c_atmel_id[] =;
MODULE_DEVICE_TABLE(i2c, i2c_atmel_id);

#ifdef CONFIG_OF
static const struct of_device_id i2c_atmel_of_match[] =;
MODULE_DEVICE_TABLE(of, i2c_atmel_of_match);
#endif

static SIMPLE_DEV_PM_OPS(i2c_atmel_pm_ops, tpm_pm_suspend, tpm_pm_resume);

static struct i2c_driver i2c_atmel_driver =;

module_i2c_driver();

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