#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <crypto/internal/kpp.h>
#include <crypto/ecdh.h>
#include <crypto/kpp.h>
#include "atmel-i2c.h"
static struct atmel_ecc_driver_data driver_data;
struct atmel_ecdh_ctx { … };
static void atmel_ecdh_done(struct atmel_i2c_work_data *work_data, void *areq,
int status)
{ … }
static int atmel_ecdh_set_secret(struct crypto_kpp *tfm, const void *buf,
unsigned int len)
{ … }
static int atmel_ecdh_generate_public_key(struct kpp_request *req)
{ … }
static int atmel_ecdh_compute_shared_secret(struct kpp_request *req)
{ … }
static struct i2c_client *atmel_ecc_i2c_client_alloc(void)
{ … }
static void atmel_ecc_i2c_client_free(struct i2c_client *client)
{ … }
static int atmel_ecdh_init_tfm(struct crypto_kpp *tfm)
{ … }
static void atmel_ecdh_exit_tfm(struct crypto_kpp *tfm)
{ … }
static unsigned int atmel_ecdh_max_size(struct crypto_kpp *tfm)
{ … }
static struct kpp_alg atmel_ecdh_nist_p256 = …;
static int atmel_ecc_probe(struct i2c_client *client)
{ … }
static void atmel_ecc_remove(struct i2c_client *client)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id atmel_ecc_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, atmel_ecc_dt_ids);
#endif
static const struct i2c_device_id atmel_ecc_id[] = …;
MODULE_DEVICE_TABLE(i2c, atmel_ecc_id);
static struct i2c_driver atmel_ecc_driver = …;
static int __init atmel_ecc_init(void)
{ … }
static void __exit atmel_ecc_exit(void)
{ … }
module_init(…) …;
module_exit(atmel_ecc_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;