#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/hw_random.h>
#include <linux/completion.h>
#include <linux/io.h>
#include <linux/bitfield.h>
#define RNGC_VER_ID …
#define RNGC_COMMAND …
#define RNGC_CONTROL …
#define RNGC_STATUS …
#define RNGC_ERROR …
#define RNGC_FIFO …
#define RNG_TYPE …
#define RNGC_VER_MAJ_SHIFT …
#define RNGC_TYPE_RNGB …
#define RNGC_TYPE_RNGC …
#define RNGC_CMD_CLR_ERR …
#define RNGC_CMD_CLR_INT …
#define RNGC_CMD_SEED …
#define RNGC_CMD_SELF_TEST …
#define RNGC_CTRL_MASK_ERROR …
#define RNGC_CTRL_MASK_DONE …
#define RNGC_CTRL_AUTO_SEED …
#define RNGC_STATUS_ERROR …
#define RNGC_STATUS_FIFO_LEVEL_MASK …
#define RNGC_STATUS_SEED_DONE …
#define RNGC_STATUS_ST_DONE …
#define RNGC_ERROR_STATUS_STAT_ERR …
#define RNGC_SELFTEST_TIMEOUT …
#define RNGC_SEED_TIMEOUT …
static bool self_test = …;
module_param(self_test, bool, 0);
struct imx_rngc { … };
static inline void imx_rngc_irq_mask_clear(struct imx_rngc *rngc)
{ … }
static inline void imx_rngc_irq_unmask(struct imx_rngc *rngc)
{ … }
static int imx_rngc_self_test(struct imx_rngc *rngc)
{ … }
static int imx_rngc_read(struct hwrng *rng, void *data, size_t max, bool wait)
{ … }
static irqreturn_t imx_rngc_irq(int irq, void *priv)
{ … }
static int imx_rngc_init(struct hwrng *rng)
{ … }
static void imx_rngc_cleanup(struct hwrng *rng)
{ … }
static int __init imx_rngc_probe(struct platform_device *pdev)
{ … }
static int imx_rngc_suspend(struct device *dev)
{ … }
static int imx_rngc_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(imx_rngc_pm_ops, imx_rngc_suspend, imx_rngc_resume);
static const struct of_device_id imx_rngc_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, imx_rngc_dt_ids);
static struct platform_driver imx_rngc_driver = …;
module_platform_driver_probe(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;