arch/um/drivers/random.c
112
hwrng_unregister(&hwrng);
arch/um/drivers/random.c
31
static struct hwrng hwrng;
arch/um/drivers/random.c
34
static int rng_dev_read(struct hwrng *rng, void *buf, size_t max, bool block)
arch/um/drivers/random.c
83
hwrng.name = RNG_MODULE_NAME;
arch/um/drivers/random.c
84
hwrng.read = rng_dev_read;
arch/um/drivers/random.c
86
err = hwrng_register(&hwrng);
drivers/char/hw_random/airoha-trng.c
125
static void airoha_trng_cleanup(struct hwrng *rng)
drivers/char/hw_random/airoha-trng.c
138
static int airoha_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/airoha-trng.c
48
struct hwrng rng;
drivers/char/hw_random/airoha-trng.c
76
static int airoha_trng_init(struct hwrng *rng)
drivers/char/hw_random/amd-rng.c
111
static void amd_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/amd-rng.c
121
static struct hwrng amd_rng = {
drivers/char/hw_random/amd-rng.c
62
static int amd_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/amd-rng.c
95
static int amd_rng_init(struct hwrng *rng)
drivers/char/hw_random/arm_smccc_trng.c
62
static int smccc_trng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/arm_smccc_trng.c
99
struct hwrng *trng;
drivers/char/hw_random/atmel-rng.c
39
struct hwrng rng;
drivers/char/hw_random/atmel-rng.c
56
static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
drivers/char/hw_random/ba431-rng.c
115
static int ba431_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/ba431-rng.c
155
static void ba431_trng_cleanup(struct hwrng *rng)
drivers/char/hw_random/ba431-rng.c
163
static int ba431_trng_init(struct hwrng *rng)
drivers/char/hw_random/ba431-rng.c
42
struct hwrng rng;
drivers/char/hw_random/bcm2835-rng.c
116
static void bcm2835_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/bcm2835-rng.c
31
struct hwrng rng;
drivers/char/hw_random/bcm2835-rng.c
38
static inline struct bcm2835_rng_priv *to_rng_priv(struct hwrng *rng)
drivers/char/hw_random/bcm2835-rng.c
63
static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max,
drivers/char/hw_random/bcm2835-rng.c
86
static int bcm2835_rng_init(struct hwrng *rng)
drivers/char/hw_random/bcm74110-rng.c
39
static int bcm74110_rng_read(struct hwrng *rng, void *buf, size_t max,
drivers/char/hw_random/bcm74110-rng.c
78
static struct hwrng bcm74110_hwrng = {
drivers/char/hw_random/cavium-rng-vf.c
146
static int cavium_rng_read(struct hwrng *rng, void *dat, size_t max, bool wait)
drivers/char/hw_random/cavium-rng-vf.c
30
struct hwrng ops;
drivers/char/hw_random/cctrng.c
209
static int cctrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/cctrng.c
55
struct hwrng rng;
drivers/char/hw_random/cn10k-rng.c
137
static int cn10k_rng_read(struct hwrng *hwrng, void *data,
drivers/char/hw_random/cn10k-rng.c
140
struct cn10k_rng *rng = (struct cn10k_rng *)hwrng->priv;
drivers/char/hw_random/cn10k-rng.c
32
struct hwrng ops;
drivers/char/hw_random/core.c
101
struct hwrng *old_rng;
drivers/char/hw_random/core.c
133
struct hwrng *rng;
drivers/char/hw_random/core.c
153
static struct hwrng *get_current_rng_nolock(void)
drivers/char/hw_random/core.c
155
struct hwrng *rng;
drivers/char/hw_random/core.c
165
static struct hwrng *get_current_rng(void)
drivers/char/hw_random/core.c
167
struct hwrng *rng;
drivers/char/hw_random/core.c
179
static void put_rng(struct hwrng *rng)
drivers/char/hw_random/core.c
185
static int hwrng_init(struct hwrng *rng)
drivers/char/hw_random/core.c
217
static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size,
drivers/char/hw_random/core.c
250
struct hwrng *rng;
drivers/char/hw_random/core.c
340
struct hwrng *rng, *cur_rng, *new_rng = NULL;
drivers/char/hw_random/core.c
35
static struct hwrng __rcu *current_rng;
drivers/char/hw_random/core.c
372
struct hwrng *rng, *new_rng;
drivers/char/hw_random/core.c
407
struct hwrng *rng;
drivers/char/hw_random/core.c
422
struct hwrng *rng;
drivers/char/hw_random/core.c
450
struct hwrng *rng;
drivers/char/hw_random/core.c
467
struct hwrng *rng;
drivers/char/hw_random/core.c
523
struct hwrng *rng;
drivers/char/hw_random/core.c
570
int hwrng_register(struct hwrng *rng)
drivers/char/hw_random/core.c
573
struct hwrng *cur_rng, *tmp;
drivers/char/hw_random/core.c
58
static int hwrng_init(struct hwrng *rng);
drivers/char/hw_random/core.c
61
static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size,
drivers/char/hw_random/core.c
619
void hwrng_unregister(struct hwrng *rng)
drivers/char/hw_random/core.c
621
struct hwrng *cur_rng;
drivers/char/hw_random/core.c
646
hwrng_unregister(*(struct hwrng **)res);
drivers/char/hw_random/core.c
651
struct hwrng **r = res;
drivers/char/hw_random/core.c
659
int devm_hwrng_register(struct device *dev, struct hwrng *rng)
drivers/char/hw_random/core.c
661
struct hwrng **ptr;
drivers/char/hw_random/core.c
680
void devm_hwrng_unregister(struct device *dev, struct hwrng *rng)
drivers/char/hw_random/core.c
686
long hwrng_msleep(struct hwrng *rng, unsigned int msecs)
drivers/char/hw_random/core.c
694
long hwrng_yield(struct hwrng *rng)
drivers/char/hw_random/core.c
71
struct hwrng *rng = container_of(work, struct hwrng, cleanup_work);
drivers/char/hw_random/core.c
94
struct hwrng *rng = container_of(kref, struct hwrng, ref);
drivers/char/hw_random/core.c
99
static int set_current_rng(struct hwrng *rng)
drivers/char/hw_random/exynos-trng.c
100
static int exynos_trng_do_read_smc(struct hwrng *rng, void *data, size_t max,
drivers/char/hw_random/exynos-trng.c
133
static int exynos_trng_init_reg(struct hwrng *rng)
drivers/char/hw_random/exynos-trng.c
166
static int exynos_trng_init_smc(struct hwrng *rng)
drivers/char/hw_random/exynos-trng.c
78
struct hwrng rng;
drivers/char/hw_random/exynos-trng.c
82
static int exynos_trng_do_read_reg(struct hwrng *rng, void *data, size_t max,
drivers/char/hw_random/geode-rng.c
59
static int geode_rng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/geode-rng.c
69
static int geode_rng_data_present(struct hwrng *rng, int wait)
drivers/char/hw_random/geode-rng.c
85
static struct hwrng geode_rng = {
drivers/char/hw_random/hisi-rng.c
31
struct hwrng rng;
drivers/char/hw_random/hisi-rng.c
34
static int hisi_rng_init(struct hwrng *rng)
drivers/char/hw_random/hisi-rng.c
57
static void hisi_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/hisi-rng.c
64
static int hisi_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/histb-rng.c
25
struct hwrng rng;
drivers/char/hw_random/histb-rng.c
60
static int histb_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/imx-rngc.c
125
static int imx_rngc_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/imx-rngc.c
177
static int imx_rngc_init(struct hwrng *rng)
drivers/char/hw_random/imx-rngc.c
234
static void imx_rngc_cleanup(struct hwrng *rng)
drivers/char/hw_random/imx-rngc.c
67
struct hwrng rng;
drivers/char/hw_random/ingenic-rng.c
36
struct hwrng rng;
drivers/char/hw_random/ingenic-rng.c
39
static int ingenic_rng_init(struct hwrng *rng)
drivers/char/hw_random/ingenic-rng.c
48
static void ingenic_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/ingenic-rng.c
55
static int ingenic_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/ingenic-trng.c
32
struct hwrng rng;
drivers/char/hw_random/ingenic-trng.c
35
static int ingenic_trng_init(struct hwrng *rng)
drivers/char/hw_random/ingenic-trng.c
47
static void ingenic_trng_cleanup(struct hwrng *rng)
drivers/char/hw_random/ingenic-trng.c
57
static int ingenic_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/intel-rng.c
167
static int intel_rng_data_present(struct hwrng *rng, int wait)
drivers/char/hw_random/intel-rng.c
182
static int intel_rng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/intel-rng.c
191
static int intel_rng_init(struct hwrng *rng)
drivers/char/hw_random/intel-rng.c
210
static void intel_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/intel-rng.c
223
static struct hwrng intel_rng = {
drivers/char/hw_random/iproc-rng200.c
151
static int iproc_rng200_init(struct hwrng *rng)
drivers/char/hw_random/iproc-rng200.c
160
static void iproc_rng200_cleanup(struct hwrng *rng)
drivers/char/hw_random/iproc-rng200.c
42
struct hwrng rng;
drivers/char/hw_random/iproc-rng200.c
90
static int iproc_rng200_read(struct hwrng *rng, void *buf, size_t max,
drivers/char/hw_random/ixp4xx-rng.c
27
static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer)
drivers/char/hw_random/ixp4xx-rng.c
36
static struct hwrng ixp4xx_rng_ops = {
drivers/char/hw_random/jh7110-trng.c
101
struct hwrng rng;
drivers/char/hw_random/jh7110-trng.c
173
static int starfive_trng_init(struct hwrng *rng)
drivers/char/hw_random/jh7110-trng.c
234
static void starfive_trng_cleanup(struct hwrng *rng)
drivers/char/hw_random/jh7110-trng.c
245
static int starfive_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/ks-sa-rng.c
112
static int ks_sa_rng_init(struct hwrng *rng)
drivers/char/hw_random/ks-sa-rng.c
152
static void ks_sa_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/ks-sa-rng.c
162
static int ks_sa_rng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/ks-sa-rng.c
176
static int ks_sa_rng_data_present(struct hwrng *rng, int wait)
drivers/char/hw_random/ks-sa-rng.c
215
ks_sa_rng->rng = (struct hwrng) {
drivers/char/hw_random/ks-sa-rng.c
84
struct hwrng rng;
drivers/char/hw_random/meson-rng.c
26
int (*read)(struct hwrng *rng, void *buf, size_t max, bool wait);
drivers/char/hw_random/meson-rng.c
31
struct hwrng rng;
drivers/char/hw_random/meson-rng.c
35
static int meson_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/meson-rng.c
59
static int meson_s4_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/mpfs-rng.c
24
struct hwrng rng;
drivers/char/hw_random/mpfs-rng.c
27
static int mpfs_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/mtk-rng.c
38
struct hwrng rng;
drivers/char/hw_random/mtk-rng.c
42
static int mtk_rng_init(struct hwrng *rng)
drivers/char/hw_random/mtk-rng.c
59
static void mtk_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/mtk-rng.c
71
static bool mtk_rng_wait_ready(struct hwrng *rng, bool wait)
drivers/char/hw_random/mtk-rng.c
84
static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/mxc-rnga.c
100
static int mxc_rnga_init(struct hwrng *rng)
drivers/char/hw_random/mxc-rnga.c
123
static void mxc_rnga_cleanup(struct hwrng *rng)
drivers/char/hw_random/mxc-rnga.c
56
struct hwrng rng;
drivers/char/hw_random/mxc-rnga.c
61
static int mxc_rnga_data_present(struct hwrng *rng, int wait)
drivers/char/hw_random/mxc-rnga.c
77
static int mxc_rnga_data_read(struct hwrng *rng, u32 * data)
drivers/char/hw_random/n2-drv.c
420
static int n2rng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/n2-drv.c
763
np->hwrng.name = DRV_MODULE_NAME;
drivers/char/hw_random/n2-drv.c
764
np->hwrng.data_read = n2rng_data_read;
drivers/char/hw_random/n2-drv.c
765
np->hwrng.priv = (unsigned long) np;
drivers/char/hw_random/n2-drv.c
767
err = devm_hwrng_register(&op->dev, &np->hwrng);
drivers/char/hw_random/n2rng.h
112
struct hwrng hwrng;
drivers/char/hw_random/nomadik-rng.c
16
static int nmk_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/nomadik-rng.c
30
static struct hwrng nmk_rng = {
drivers/char/hw_random/npcm-rng.c
34
struct hwrng rng;
drivers/char/hw_random/npcm-rng.c
39
static int npcm_rng_init(struct hwrng *rng)
drivers/char/hw_random/npcm-rng.c
48
static void npcm_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/npcm-rng.c
55
static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/octeon-rng.c
23
struct hwrng ops;
drivers/char/hw_random/octeon-rng.c
28
static int octeon_rng_init(struct hwrng *rng)
drivers/char/hw_random/octeon-rng.c
40
static void octeon_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/octeon-rng.c
50
static int octeon_rng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/octeon-rng.c
64
struct hwrng ops = {
drivers/char/hw_random/omap-rng.c
156
struct hwrng rng;
drivers/char/hw_random/omap-rng.c
173
static int omap_rng_do_read(struct hwrng *rng, void *data, size_t max,
drivers/char/hw_random/omap-rng.c
203
static int omap_rng_init(struct hwrng *rng)
drivers/char/hw_random/omap-rng.c
211
static void omap_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/omap3-rom-rng.c
33
struct hwrng ops;
drivers/char/hw_random/omap3-rom-rng.c
37
static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
drivers/char/hw_random/optee-rng.c
115
static int optee_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/optee-rng.c
143
static int optee_rng_init(struct hwrng *rng)
drivers/char/hw_random/optee-rng.c
160
static void optee_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/optee-rng.c
67
struct hwrng optee_rng;
drivers/char/hw_random/pasemi-rng.c
33
static int pasemi_rng_data_present(struct hwrng *rng, int wait)
drivers/char/hw_random/pasemi-rng.c
48
static int pasemi_rng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/pasemi-rng.c
55
static int pasemi_rng_init(struct hwrng *rng)
drivers/char/hw_random/pasemi-rng.c
67
static void pasemi_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/pasemi-rng.c
77
static struct hwrng pasemi_rng = {
drivers/char/hw_random/pic32-rng.c
30
struct hwrng rng;
drivers/char/hw_random/pic32-rng.c
40
static int pic32_rng_init(struct hwrng *rng)
drivers/char/hw_random/pic32-rng.c
49
static int pic32_rng_read(struct hwrng *rng, void *buf, size_t max,
drivers/char/hw_random/pic32-rng.c
70
static void pic32_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/powernv-rng.c
16
static int powernv_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/powernv-rng.c
32
static struct hwrng powernv_hwrng = {
drivers/char/hw_random/pseries-rng.c
16
static int pseries_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/pseries-rng.c
46
static struct hwrng pseries_rng = {
drivers/char/hw_random/rockchip-rng.c
125
struct hwrng rng;
drivers/char/hw_random/rockchip-rng.c
134
int (*rk_rng_init)(struct hwrng *rng);
drivers/char/hw_random/rockchip-rng.c
135
int (*rk_rng_read)(struct hwrng *rng, void *buf, size_t max, bool wait);
drivers/char/hw_random/rockchip-rng.c
136
void (*rk_rng_cleanup)(struct hwrng *rng);
drivers/char/hw_random/rockchip-rng.c
170
static int rk3568_rng_init(struct hwrng *rng)
drivers/char/hw_random/rockchip-rng.c
191
static void rk3568_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/rockchip-rng.c
202
static int rk3568_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/rockchip-rng.c
231
static int rk3576_rng_init(struct hwrng *rng)
drivers/char/hw_random/rockchip-rng.c
238
static int rk3576_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/rockchip-rng.c
270
static int rk3588_rng_init(struct hwrng *rng)
drivers/char/hw_random/rockchip-rng.c
315
static void rk3588_rng_cleanup(struct hwrng *rng)
drivers/char/hw_random/rockchip-rng.c
322
static int rk3588_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/hw_random/s390-trng.c
162
static int trng_hwrng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/s390-trng.c
173
static int trng_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/s390-trng.c
190
static struct hwrng trng_hwrng_dev = {
drivers/char/hw_random/st-rng.c
45
struct hwrng ops;
drivers/char/hw_random/st-rng.c
48
static int st_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/stm32-rng.c
173
static int stm32_rng_conceal_seed_error(struct hwrng *rng)
drivers/char/hw_random/stm32-rng.c
186
static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/hw_random/stm32-rng.c
263
static uint stm32_rng_clock_freq_restrain(struct hwrng *rng)
drivers/char/hw_random/stm32-rng.c
285
static int stm32_rng_init(struct hwrng *rng)
drivers/char/hw_random/stm32-rng.c
74
struct hwrng rng;
drivers/char/hw_random/timeriomem-rng.c
41
struct hwrng rng_ops;
drivers/char/hw_random/timeriomem-rng.c
44
static int timeriomem_rng_read(struct hwrng *hwrng, void *data,
drivers/char/hw_random/timeriomem-rng.c
48
container_of(hwrng, struct timeriomem_rng_private, rng_ops);
drivers/char/hw_random/via-rng.c
120
static int via_rng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/via-rng.c
129
static int via_rng_init(struct hwrng *rng)
drivers/char/hw_random/via-rng.c
187
static struct hwrng via_rng = {
drivers/char/hw_random/via-rng.c
87
static int via_rng_data_present(struct hwrng *rng, int wait)
drivers/char/hw_random/virtio-rng.c
125
static void virtio_cleanup(struct hwrng *rng)
drivers/char/hw_random/virtio-rng.c
149
vi->hwrng = (struct hwrng) {
drivers/char/hw_random/virtio-rng.c
187
hwrng_unregister(&vi->hwrng);
drivers/char/hw_random/virtio-rng.c
209
err = hwrng_register(&vi->hwrng);
drivers/char/hw_random/virtio-rng.c
21
struct hwrng hwrng;
drivers/char/hw_random/virtio-rng.c
234
err = hwrng_register(&vi->hwrng);
drivers/char/hw_random/virtio-rng.c
81
static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)
drivers/char/hw_random/xgene-rng.c
210
static int xgene_rng_data_present(struct hwrng *rng, int wait)
drivers/char/hw_random/xgene-rng.c
225
static int xgene_rng_data_read(struct hwrng *rng, u32 *data)
drivers/char/hw_random/xgene-rng.c
274
static int xgene_rng_init(struct hwrng *rng)
drivers/char/hw_random/xgene-rng.c
306
static struct hwrng xgene_rng_func = {
drivers/char/hw_random/xiphera-trng.c
32
struct hwrng rng;
drivers/char/hw_random/xiphera-trng.c
35
static int xiphera_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/char/tpm/tpm-chip.c
493
static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/char/tpm/tpm-chip.c
495
struct tpm_chip *chip = container_of(rng, struct tpm_chip, hwrng);
drivers/char/tpm/tpm-chip.c
518
chip->hwrng.name = chip->hwrng_name;
drivers/char/tpm/tpm-chip.c
519
chip->hwrng.read = tpm_hwrng_read;
drivers/char/tpm/tpm-chip.c
520
return hwrng_register(&chip->hwrng);
drivers/char/tpm/tpm-chip.c
619
hwrng_unregister(&chip->hwrng);
drivers/char/tpm/tpm-chip.c
654
hwrng_unregister(&chip->hwrng);
drivers/char/tpm/tpm_tis_core.c
1125
chip->hwrng.quality = priv->rng_quality;
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
23
static int sun8i_ce_trng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
236
struct hwrng trng;
drivers/crypto/amcc/crypto4xx_core.h
109
struct hwrng *trng;
drivers/crypto/amcc/crypto4xx_trng.c
28
static int ppc4xx_trng_data_present(struct hwrng *rng, int wait)
drivers/crypto/amcc/crypto4xx_trng.c
45
static int ppc4xx_trng_data_read(struct hwrng *rng, u32 *data)
drivers/crypto/amcc/crypto4xx_trng.c
75
struct hwrng *rng = NULL;
drivers/crypto/atmel-i2c.h
147
struct hwrng hwrng;
drivers/crypto/atmel-sha204a.c
162
memset(&i2c_priv->hwrng, 0, sizeof(i2c_priv->hwrng));
drivers/crypto/atmel-sha204a.c
164
i2c_priv->hwrng.name = dev_name(&client->dev);
drivers/crypto/atmel-sha204a.c
165
i2c_priv->hwrng.read = atmel_sha204a_rng_read;
drivers/crypto/atmel-sha204a.c
171
i2c_priv->hwrng.quality = 1;
drivers/crypto/atmel-sha204a.c
173
ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng);
drivers/crypto/atmel-sha204a.c
201
kfree((void *)i2c_priv->hwrng.priv);
drivers/crypto/atmel-sha204a.c
25
struct hwrng *rng = areq;
drivers/crypto/atmel-sha204a.c
36
static int atmel_sha204a_rng_read_nonblocking(struct hwrng *rng, void *data,
drivers/crypto/atmel-sha204a.c
42
i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng);
drivers/crypto/atmel-sha204a.c
71
static int atmel_sha204a_rng_read(struct hwrng *rng, void *data, size_t max,
drivers/crypto/atmel-sha204a.c
81
i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng);
drivers/crypto/caam/caamrng.c
147
static int caam_read(struct hwrng *rng, void *dst, size_t max, bool wait)
drivers/crypto/caam/caamrng.c
166
static void caam_cleanup(struct hwrng *rng)
drivers/crypto/caam/caamrng.c
176
static inline void test_len(struct hwrng *rng, size_t len, bool wait)
drivers/crypto/caam/caamrng.c
207
static inline void test_mode_once(struct hwrng *rng, bool wait)
drivers/crypto/caam/caamrng.c
214
static void self_test(struct hwrng *rng)
drivers/crypto/caam/caamrng.c
221
static int caam_init(struct hwrng *rng)
drivers/crypto/caam/caamrng.c
38
struct hwrng rng;
drivers/crypto/caam/caamrng.c
52
static struct caam_rng_ctx *to_caam_rng_ctx(struct hwrng *r)
drivers/crypto/caam/intern.h
69
bool hwrng;
drivers/crypto/caam/jr.c
192
if (jrpriv->hwrng)
drivers/crypto/caam/jr.c
42
jrpriv->hwrng = !caam_rng_init(dev);
drivers/crypto/caam/jr.c
706
if (jrpriv->hwrng)
drivers/crypto/caam/jr.c
795
if (jrpriv->hwrng)
drivers/crypto/caam/jr.c
796
jrpriv->hwrng = !caam_rng_init(dev->parent);
drivers/crypto/ccp/ccp-dev.c
188
ccp->hwrng.name = ccp->rngname;
drivers/crypto/ccp/ccp-dev.c
189
ccp->hwrng.read = ccp_trng_read;
drivers/crypto/ccp/ccp-dev.c
190
ret = hwrng_register(&ccp->hwrng);
drivers/crypto/ccp/ccp-dev.c
199
if (ccp->hwrng.name)
drivers/crypto/ccp/ccp-dev.c
200
hwrng_unregister(&ccp->hwrng);
drivers/crypto/ccp/ccp-dev.c
506
int ccp_trng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/crypto/ccp/ccp-dev.c
508
struct ccp_device *ccp = container_of(rng, struct ccp_device, hwrng);
drivers/crypto/ccp/ccp-dev.h
386
struct hwrng hwrng;
drivers/crypto/ccp/ccp-dev.h
639
int ccp_trng_read(struct hwrng *rng, void *data, size_t max, bool wait);
drivers/crypto/gemini/sl3516-ce-rng.c
13
static int sl3516_ce_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/crypto/gemini/sl3516-ce.h
243
struct hwrng trng;
drivers/crypto/hifn_795x.c
436
struct hwrng rng;
drivers/crypto/hifn_795x.c
733
static int hifn_rng_data_present(struct hwrng *rng, int wait)
drivers/crypto/hifn_795x.c
748
static int hifn_rng_data_read(struct hwrng *rng, u32 *data)
drivers/crypto/hisilicon/trng/trng.c
232
static int hisi_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/crypto/hisilicon/trng/trng.c
55
struct hwrng rng;
drivers/crypto/hisilicon/trng/trng.c
69
static int hisi_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait);
drivers/crypto/qcom-rng.c
116
static int qcom_hwrng_read(struct hwrng *hwrng, void *data, size_t max, bool wait)
drivers/crypto/qcom-rng.c
118
struct qcom_rng *qrng = container_of(hwrng, struct qcom_rng, hwrng);
drivers/crypto/qcom-rng.c
210
rng->hwrng.name = "qcom_hwrng";
drivers/crypto/qcom-rng.c
211
rng->hwrng.read = qcom_hwrng_read;
drivers/crypto/qcom-rng.c
212
rng->hwrng.quality = QCOM_TRNG_QUALITY;
drivers/crypto/qcom-rng.c
213
ret = devm_hwrng_register(&pdev->dev, &rng->hwrng);
drivers/crypto/qcom-rng.c
38
struct hwrng hwrng;
drivers/crypto/talitos.c
753
static int talitos_rng_data_present(struct hwrng *rng, int wait)
drivers/crypto/talitos.c
771
static int talitos_rng_data_read(struct hwrng *rng, u32 *data)
drivers/crypto/talitos.c
783
static int talitos_rng_init(struct hwrng *rng)
drivers/crypto/talitos.h
154
struct hwrng rng;
drivers/crypto/xilinx/xilinx-trng.c
290
static int xtrng_hwrng_trng_read(struct hwrng *hwrng, void *data, size_t max, bool wait)
drivers/crypto/xilinx/xilinx-trng.c
296
rng = container_of(hwrng, struct xilinx_rng, trng);
drivers/crypto/xilinx/xilinx-trng.c
316
static int xtrng_hwrng_register(struct hwrng *trng)
drivers/crypto/xilinx/xilinx-trng.c
330
static void xtrng_hwrng_unregister(struct hwrng *trng)
drivers/crypto/xilinx/xilinx-trng.c
65
struct hwrng trng;
drivers/firmware/turris-mox-rwtm.c
252
static int mox_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/firmware/turris-mox-rwtm.c
254
struct mox_rwtm *rwtm = container_of(rng, struct mox_rwtm, hwrng);
drivers/firmware/turris-mox-rwtm.c
475
rwtm->hwrng.name = DRIVER_NAME "_hwrng";
drivers/firmware/turris-mox-rwtm.c
476
rwtm->hwrng.read = mox_hwrng_read;
drivers/firmware/turris-mox-rwtm.c
478
ret = devm_hwrng_register(dev, &rwtm->hwrng);
drivers/firmware/turris-mox-rwtm.c
90
struct hwrng hwrng;
drivers/hid/hid-u2fzero.c
197
static int u2fzero_rng_read(struct hwrng *rng, void *data,
drivers/hid/hid-u2fzero.c
201
struct u2fzero_device, hwrng);
drivers/hid/hid-u2fzero.c
262
dev->hwrng.name = dev->rng_name;
drivers/hid/hid-u2fzero.c
263
dev->hwrng.read = u2fzero_rng_read;
drivers/hid/hid-u2fzero.c
265
return devm_hwrng_register(&dev->hdev->dev, &dev->hwrng);
drivers/hid/hid-u2fzero.c
83
struct hwrng hwrng; /* Embedded struct for hwrng */
drivers/misc/nsm.c
323
static int nsm_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/misc/nsm.c
443
nsm->hwrng = (struct hwrng) {
drivers/misc/nsm.c
449
rc = hwrng_register(&nsm->hwrng);
drivers/misc/nsm.c
472
hwrng_unregister(&nsm->hwrng);
drivers/misc/nsm.c
484
hwrng_unregister(&nsm->hwrng);
drivers/misc/nsm.c
56
struct hwrng hwrng;
drivers/misc/nsm.c
72
static struct nsm *hwrng_to_nsm(struct hwrng *rng)
drivers/misc/nsm.c
74
return container_of(rng, struct nsm, hwrng);
drivers/net/wireless/ath/ath9k/ath9k.h
1077
struct hwrng rng_ops;
drivers/net/wireless/ath/ath9k/rng.c
69
static int ath9k_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
drivers/net/wireless/ath/carl9170/carl9170.h
455
struct hwrng rng;
drivers/net/wireless/ath/carl9170/main.c
1566
static int carl9170_rng_read(struct hwrng *rng, u32 *data)
drivers/net/wireless/broadcom/b43/b43.h
933
struct hwrng rng;
drivers/net/wireless/broadcom/b43/main.c
3535
static int b43_rng_read(struct hwrng *rng, u32 *data)
drivers/net/wireless/broadcom/b43legacy/b43legacy.h
608
struct hwrng rng;
drivers/net/wireless/broadcom/b43legacy/main.c
2399
static int b43legacy_rng_read(struct hwrng *rng, u32 *data)
drivers/platform/cznic/turris-omnia-mcu-trng.c
32
static int omnia_trng_read(struct hwrng *rng, void *data, size_t max, bool wait)
drivers/platform/cznic/turris-omnia-mcu.h
100
struct hwrng trng;
drivers/s390/crypto/zcrypt_api.c
1760
static int zcrypt_rng_data_read(struct hwrng *rng, u32 *data)
drivers/s390/crypto/zcrypt_api.c
1781
static struct hwrng zcrypt_rng_dev = {
drivers/usb/misc/chaoskey.c
203
dev->hwrng.name = dev->name ? dev->name : chaoskey_driver.name;
drivers/usb/misc/chaoskey.c
204
dev->hwrng.read = chaoskey_rng_read;
drivers/usb/misc/chaoskey.c
206
dev->hwrng_registered = (hwrng_register(&dev->hwrng) == 0);
drivers/usb/misc/chaoskey.c
233
hwrng_unregister(&dev->hwrng);
drivers/usb/misc/chaoskey.c
27
static int chaoskey_rng_read(struct hwrng *rng, void *data,
drivers/usb/misc/chaoskey.c
501
static int chaoskey_rng_read(struct hwrng *rng, void *data,
drivers/usb/misc/chaoskey.c
504
struct chaoskey *dev = container_of(rng, struct chaoskey, hwrng);
drivers/usb/misc/chaoskey.c
89
struct hwrng hwrng; /* Embedded struct for hwrng */
include/linux/hw_random.h
41
int (*init)(struct hwrng *rng);
include/linux/hw_random.h
42
void (*cleanup)(struct hwrng *rng);
include/linux/hw_random.h
43
int (*data_present)(struct hwrng *rng, int wait);
include/linux/hw_random.h
44
int (*data_read)(struct hwrng *rng, u32 *data);
include/linux/hw_random.h
45
int (*read)(struct hwrng *rng, void *data, size_t max, bool wait);
include/linux/hw_random.h
60
extern int hwrng_register(struct hwrng *rng);
include/linux/hw_random.h
61
extern int devm_hwrng_register(struct device *dev, struct hwrng *rng);
include/linux/hw_random.h
63
extern void hwrng_unregister(struct hwrng *rng);
include/linux/hw_random.h
64
extern void devm_hwrng_unregister(struct device *dve, struct hwrng *rng);
include/linux/hw_random.h
66
extern long hwrng_msleep(struct hwrng *rng, unsigned int msecs);
include/linux/hw_random.h
67
extern long hwrng_yield(struct hwrng *rng);
include/linux/tpm.h
176
struct hwrng hwrng;