linux/drivers/char/hw_random/ba431-rng.c

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2020 Silex Insight

#include <linux/delay.h>
#include <linux/hw_random.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>

#define BA431_RESET_DELAY
#define BA431_RESET_READ_STATUS_TIMEOUT
#define BA431_RESET_READ_STATUS_INTERVAL
#define BA431_READ_RETRY_INTERVAL

#define BA431_REG_CTRL
#define BA431_REG_FIFO_LEVEL
#define BA431_REG_STATUS
#define BA431_REG_FIFODATA

#define BA431_CTRL_ENABLE
#define BA431_CTRL_SOFTRESET

#define BA431_STATUS_STATE_MASK
#define BA431_STATUS_STATE_OFFSET

enum ba431_state {};

struct ba431_trng {};

static inline u32 ba431_trng_read_reg(struct ba431_trng *ba431, u32 reg)
{}

static inline void ba431_trng_write_reg(struct ba431_trng *ba431, u32 reg,
					u32 val)
{}

static inline enum ba431_state ba431_trng_get_state(struct ba431_trng *ba431)
{}

static int ba431_trng_is_in_error(struct ba431_trng *ba431)
{}

static int ba431_trng_reset(struct ba431_trng *ba431)
{}

static void ba431_trng_reset_work(struct work_struct *work)
{}

static void ba431_trng_schedule_reset(struct ba431_trng *ba431)
{}

static int ba431_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
{}

static void ba431_trng_cleanup(struct hwrng *rng)
{}

static int ba431_trng_init(struct hwrng *rng)
{}

static int ba431_trng_probe(struct platform_device *pdev)
{}

static const struct of_device_id ba431_trng_dt_ids[] =;
MODULE_DEVICE_TABLE(of, ba431_trng_dt_ids);

static struct platform_driver ba431_trng_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();