Lines Matching refs:rng
32 struct hwrng rng; member
39 static inline struct bcm2835_rng_priv *to_rng_priv(struct hwrng *rng) in to_rng_priv() argument
41 return container_of(rng, struct bcm2835_rng_priv, rng); in to_rng_priv()
64 static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max, in bcm2835_rng_read() argument
67 struct bcm2835_rng_priv *priv = to_rng_priv(rng); in bcm2835_rng_read()
74 hwrng_msleep(rng, 1000); in bcm2835_rng_read()
87 static int bcm2835_rng_init(struct hwrng *rng) in bcm2835_rng_init() argument
89 struct bcm2835_rng_priv *priv = to_rng_priv(rng); in bcm2835_rng_init()
115 static void bcm2835_rng_cleanup(struct hwrng *rng) in bcm2835_rng_cleanup() argument
117 struct bcm2835_rng_priv *priv = to_rng_priv(rng); in bcm2835_rng_cleanup()
169 priv->rng.name = pdev->name; in bcm2835_rng_probe()
170 priv->rng.init = bcm2835_rng_init; in bcm2835_rng_probe()
171 priv->rng.read = bcm2835_rng_read; in bcm2835_rng_probe()
172 priv->rng.cleanup = bcm2835_rng_cleanup; in bcm2835_rng_probe()
186 err = devm_hwrng_register(dev, &priv->rng); in bcm2835_rng_probe()