#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/hw_random.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/random.h>
#define RNG_SEED …
#define RNG_CTRL …
#define RNG_SEED_SEL …
#define RNG_RING_EN …
#define RNG_EN …
#define RNG_RAN_NUM …
#define RNG_PHY_SEED …
#define to_hisi_rng(p) …
static int seed_sel;
module_param(seed_sel, int, S_IRUGO);
MODULE_PARM_DESC(…) …;
struct hisi_rng { … };
static int hisi_rng_init(struct hwrng *rng)
{ … }
static void hisi_rng_cleanup(struct hwrng *rng)
{ … }
static int hisi_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
{ … }
static int hisi_rng_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id hisi_rng_dt_ids[] __maybe_unused = …;
MODULE_DEVICE_TABLE(of, hisi_rng_dt_ids);
static struct platform_driver hisi_rng_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;