From 284e76387c38260e834c99b010a68d75fc46b394 Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Mon, 22 May 2017 14:12:24 -0700 Subject: hw_random: timeriomem_rng: Allow setting RNG quality from platform data When a hw_random device's quality is non-zero, it will automatically be used to fill the kernel's entropy pool. Since timeriomem_rng is used by many different devices, the quality needs to be provided by platform data or device tree. Signed-off-by: Rick Altherr Signed-off-by: Herbert Xu --- include/linux/timeriomem-rng.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/timeriomem-rng.h b/include/linux/timeriomem-rng.h index 46eb27ddbfab..3e00122bcf88 100644 --- a/include/linux/timeriomem-rng.h +++ b/include/linux/timeriomem-rng.h @@ -13,4 +13,7 @@ struct timeriomem_rng_data { /* measures in usecs */ unsigned int period; + + /* bits of entropy per 1024 bits read */ + unsigned int quality; }; -- cgit v1.2.3