Lines Matching full:rng

31 	struct hwrng rng;  member
38 static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) in stm32_rng_read() argument
41 container_of(rng, struct stm32_rng_private, rng); in stm32_rng_read()
45 pm_runtime_get_sync((struct device *) priv->rng.priv); in stm32_rng_read()
50 /* care of initial delay time when enabling rng */ in stm32_rng_read()
57 dev_err((struct device *)priv->rng.priv, in stm32_rng_read()
64 "bad RNG status - %x\n", sr)) in stm32_rng_read()
76 pm_runtime_mark_last_busy((struct device *) priv->rng.priv); in stm32_rng_read()
77 pm_runtime_put_sync_autosuspend((struct device *) priv->rng.priv); in stm32_rng_read()
82 static int stm32_rng_init(struct hwrng *rng) in stm32_rng_init() argument
85 container_of(rng, struct stm32_rng_private, rng); in stm32_rng_init()
104 static void stm32_rng_cleanup(struct hwrng *rng) in stm32_rng_cleanup() argument
107 container_of(rng, struct stm32_rng_private, rng); in stm32_rng_cleanup()
148 priv->rng.name = dev_driver_string(dev); in stm32_rng_probe()
150 priv->rng.init = stm32_rng_init; in stm32_rng_probe()
151 priv->rng.cleanup = stm32_rng_cleanup; in stm32_rng_probe()
153 priv->rng.read = stm32_rng_read; in stm32_rng_probe()
154 priv->rng.priv = (unsigned long) dev; in stm32_rng_probe()
155 priv->rng.quality = 900; in stm32_rng_probe()
161 return devm_hwrng_register(dev, &priv->rng); in stm32_rng_probe()
176 stm32_rng_cleanup(&priv->rng); in stm32_rng_runtime_suspend()
185 return stm32_rng_init(&priv->rng); in stm32_rng_runtime_resume()
199 .compatible = "st,stm32-rng",
207 .name = "stm32-rng",
219 MODULE_DESCRIPTION("STMicroelectronics STM32 RNG device driver");