Lines Matching full:trng
3 * sun8i-ce-trng.c - hardware cryptographic offloader for
8 * This file handle the TRNG
17 * Note that according to the algorithm ID, 2 versions of the TRNG exists,
35 ce = container_of(rng, struct sun8i_ce_dev, trng); in sun8i_ce_trng_read()
68 common = ce->variant->trng | CE_COMM_INT; in sun8i_ce_trng_read()
84 err = sun8i_ce_run_task(ce, 3, "TRNG"); in sun8i_ce_trng_read()
105 if (ce->variant->trng == CE_ID_NOTSUPP) { in sun8i_ce_hwrng_register()
106 dev_info(ce->dev, "TRNG not supported\n"); in sun8i_ce_hwrng_register()
109 ce->trng.name = "sun8i Crypto Engine TRNG"; in sun8i_ce_hwrng_register()
110 ce->trng.read = sun8i_ce_trng_read; in sun8i_ce_hwrng_register()
112 ret = hwrng_register(&ce->trng); in sun8i_ce_hwrng_register()
114 dev_err(ce->dev, "Fail to register the TRNG\n"); in sun8i_ce_hwrng_register()
120 if (ce->variant->trng == CE_ID_NOTSUPP) in sun8i_ce_hwrng_unregister()
122 hwrng_unregister(&ce->trng); in sun8i_ce_hwrng_unregister()