From 223fd81f3a59c35d2255c0891acbf0d36beabec7 Mon Sep 17 00:00:00 2001 From: AnilKumar Chimata Date: Fri, 10 Jul 2015 17:46:30 +0530 Subject: [PATCH] hwrng: Add quality parameter to msm-rng driver With the recent changes in upstream, certain parameters are updated in the core random number generator driver. So update HW rng driver to provide the quality estimation of true entropy in RNG's bitstream. Value 700 corresponds to 70% an arbitrary value, which is taken from 3.10. Change-Id: I0d27e44a05473bcbc84af82c79565f87329b9ae7 Signed-off-by: AnilKumar Chimata --- drivers/char/hw_random/msm-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/hw_random/msm-rng.c b/drivers/char/hw_random/msm-rng.c index 96fb986402eb..296b23960815 100644 --- a/drivers/char/hw_random/msm-rng.c +++ b/drivers/char/hw_random/msm-rng.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2013,2015,2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -156,6 +156,7 @@ static int msm_rng_probe(struct platform_device *pdev) rng->hwrng.init = msm_rng_init, rng->hwrng.cleanup = msm_rng_cleanup, rng->hwrng.read = msm_rng_read, + rng->hwrng.quality = 700; ret = devm_hwrng_register(&pdev->dev, &rng->hwrng); if (ret) {