#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/hw_random.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#define CONTROL_REG …
#define STATUS_REG …
#define RAND_REG …
#define HOST_TO_TRNG_RESET …
#define HOST_TO_TRNG_RELEASE_RESET …
#define HOST_TO_TRNG_ENABLE …
#define HOST_TO_TRNG_ZEROIZE …
#define HOST_TO_TRNG_ACK_ZEROIZE …
#define HOST_TO_TRNG_READ …
#define TRNG_ACK_RESET …
#define TRNG_SUCCESSFUL_STARTUP …
#define TRNG_FAILED_STARTUP …
#define TRNG_NEW_RAND_AVAILABLE …
struct xiphera_trng { … };
static int xiphera_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
{ … }
static int xiphera_trng_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id xiphera_trng_of_match[] = …;
MODULE_DEVICE_TABLE(of, xiphera_trng_of_match);
static struct platform_driver xiphera_trng_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;