Thread (1 message) 1 message, 1 author, 2011-10-06
DORMANTno replies

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

From: jacmet@sunsite.dk (Peter Korsgaard)
Date: 2011-10-06 15:55:32

quoted
quoted
quoted
quoted
"Mark" == Mark Brown [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help