[PATCH 2/2] hw_random: add driver for atmel true hardware random number generator

Peter Korsgaard jacmet at sunsite.dk
Thu Oct 6 11:55:32 EDT 2011


>>>>> "Mark" == Mark Brown <broonie at opensource.wolfsonmicro.com> writes:

 Mark> On Thu, Oct 06, 2011 at 05:41:34PM +0200, Peter Korsgaard wrote:
 >> +	trng->clk = clk_get(&pdev->dev, NULL);
 >> +	if (IS_ERR(trng->clk))
 >> +		return PTR_ERR(trng->clk);
 >> +
 >> +	ret = clk_enable(trng->clk);
 >> +	if (ret)
 >> +		goto err_enable;

 Mark> Is it worth enabling the hardware enabled only when the device is open?

Potentially, though I doubt it uses significant power. I kept it like
this for simplicity, to match the other drivers and because hw_random
doesn't have an open/close callback (init is called right away in
hwrng_register or on current change).

-- 
Bye, Peter Korsgaard



More information about the linux-arm-kernel mailing list