#include <crypto/internal/rng.h>
#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/crypto.h>
#include <linux/hw_random.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#define PRNG_DATA_OUT …
#define PRNG_STATUS …
#define PRNG_LFSR_CFG …
#define PRNG_CONFIG …
#define PRNG_LFSR_CFG_MASK …
#define PRNG_LFSR_CFG_CLOCKS …
#define PRNG_CONFIG_HW_ENABLE …
#define PRNG_STATUS_DATA_AVAIL …
#define WORD_SZ …
#define QCOM_TRNG_QUALITY …
struct qcom_rng { … };
struct qcom_rng_ctx { … };
struct qcom_rng_of_data { … };
static struct qcom_rng *qcom_rng_dev;
static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max)
{ … }
static int qcom_rng_generate(struct crypto_rng *tfm,
const u8 *src, unsigned int slen,
u8 *dstn, unsigned int dlen)
{ … }
static int qcom_rng_seed(struct crypto_rng *tfm, const u8 *seed,
unsigned int slen)
{ … }
static int qcom_hwrng_read(struct hwrng *hwrng, void *data, size_t max, bool wait)
{ … }
static int qcom_rng_enable(struct qcom_rng *rng)
{ … }
static int qcom_rng_init(struct crypto_tfm *tfm)
{ … }
static struct rng_alg qcom_rng_alg = …;
static int qcom_rng_probe(struct platform_device *pdev)
{ … }
static void qcom_rng_remove(struct platform_device *pdev)
{ … }
static struct qcom_rng_of_data qcom_prng_of_data = …;
static struct qcom_rng_of_data qcom_prng_ee_of_data = …;
static struct qcom_rng_of_data qcom_trng_of_data = …;
static const struct acpi_device_id __maybe_unused qcom_rng_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, qcom_rng_acpi_match);
static const struct of_device_id __maybe_unused qcom_rng_of_match[] = …;
MODULE_DEVICE_TABLE(of, qcom_rng_of_match);
static struct platform_driver qcom_rng_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;