Quoting Alexander Steffen (2019-07-17 05:00:06)
On 17.07.2019 00:45, Stephen Boyd wrote:
From: Andrey Pronin <apronin@xxxxxxxxxxxx>
+static unsigned short rng_quality = 1022;
+module_param(rng_quality, ushort, 0644);
+MODULE_PARM_DESC(rng_quality,
+ "Estimation of true entropy, in bits per 1024 bits.");
What is the purpose of this parameter? None of the other TPM drivers
have it.
I think the idea is to let users override the quality if they decide
that they don't want to use the default value specified in the driver.
This copies a lot of code from tpm_tis_spi, but then slightly changes
some things, without really explaining why.
The commit text has some explanations. Here's the copy/paste from above:
- need to ensure a certain delay between spi transactions, or else
the chip may miss some part of the next transaction;
- if there is no spi activity for some time, it may go to sleep,
and needs to be waken up before sending further commands;
- access to vendor-specific registers.
Do you want me to describe something further?
For example, struct
cr50_spi_phy contains both tx_buf and rx_buf, whereas tpm_tis_spi uses a
single iobuf, that is allocated via devm_kmalloc instead of being part
of the struct. Maybe the difference matters, maybe not, who knows?
Ok. Are you asking if this is a full-duplex SPI device?