mbox series

[v2,0/2] Add dm_rng_read_default() helper

Message ID 20231102091648.40520-1-avromanov@salutedevices.com
Headers show
Series Add dm_rng_read_default() helper | expand

Message

Alexey Romanov Nov. 2, 2023, 9:16 a.m. UTC
Hello!

This patchset adds dm_rng_read_default() helper function, 
that selects the first rng device and uses it to obtain
random bytes.

V2:

- Move platform_get_rng_device() to rng-uclass.c. 
- Re-implement it to get first successfully probed device.
- Use it in dm_rng_read_default().

Alexey Romanov (2):
  rng: move platform_get_rng_device() to rng-uclass.c
  rng: add dm_rng_read_default() helper

 drivers/rng/rng-uclass.c | 34 ++++++++++++++++++++++++++++++++++
 include/efi_rng.h        |  2 --
 include/rng.h            | 21 +++++++++++++++++++++
 lib/efi_loader/efi_rng.c | 27 ---------------------------
 4 files changed, 55 insertions(+), 29 deletions(-)