Lines Matching refs:hwrng
41 struct hwrng hwrng; member
44 #define to_msm_rng(p) container_of(p, struct msm_rng, hwrng)
46 static int msm_rng_enable(struct hwrng *hwrng, int enable) in msm_rng_enable() argument
48 struct msm_rng *rng = to_msm_rng(hwrng); in msm_rng_enable()
81 static int msm_rng_read(struct hwrng *hwrng, void *data, size_t max, bool wait) in msm_rng_read() argument
83 struct msm_rng *rng = to_msm_rng(hwrng); in msm_rng_read()
124 static int msm_rng_init(struct hwrng *hwrng) in msm_rng_init() argument
126 return msm_rng_enable(hwrng, 1); in msm_rng_init()
129 static void msm_rng_cleanup(struct hwrng *hwrng) in msm_rng_cleanup() argument
131 msm_rng_enable(hwrng, 0); in msm_rng_cleanup()
155 rng->hwrng.name = KBUILD_MODNAME, in msm_rng_probe()
156 rng->hwrng.init = msm_rng_init, in msm_rng_probe()
157 rng->hwrng.cleanup = msm_rng_cleanup, in msm_rng_probe()
158 rng->hwrng.read = msm_rng_read, in msm_rng_probe()
160 ret = devm_hwrng_register(&pdev->dev, &rng->hwrng); in msm_rng_probe()