9 #include <linux/kernel.h>
10 #include <linux/module.h>
11 #include <linux/slab.h>
20 #define TRNG_ODATA 0x50
22 #define TRNG_KEY 0x524e4700
30 static int atmel_trng_read(
struct hwrng *rng,
void *
buf,
size_t max,
66 resource_size(res), pdev->
name))
74 if (IS_ERR(trng->
clk))
75 return PTR_ERR(trng->
clk);
83 trng->
rng.read = atmel_trng_read;
89 platform_set_drvdata(pdev, trng);
103 struct atmel_trng *trng = platform_get_drvdata(pdev);
111 platform_set_drvdata(pdev,
NULL);
117 static int atmel_trng_suspend(
struct device *
dev)
126 static int atmel_trng_resume(
struct device *
dev)
133 static const struct dev_pm_ops atmel_trng_pm_ops = {
135 .resume = atmel_trng_resume,
140 .probe = atmel_trng_probe,
143 .name =
"atmel-trng",
146 .pm = &atmel_trng_pm_ops,