All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sughosh Ganu <sughosh.ganu@linaro.org>
To: u-boot@lists.denx.de
Subject: [PATCH v3 1/8] dm: rng: Add random number generator(rng) uclass
Date: Tue, 17 Dec 2019 00:25:14 +0530	[thread overview]
Message-ID: <CADg8p96CzSbrxzgonavRxvSmBniqwb+R2X1Y0R0JtGFLTNO-Cg@mail.gmail.com> (raw)
In-Reply-To: <31fe80c8091b4785b9dd648f410896c4@SFHDAG6NODE3.st.com>

hi Patrick,

On Mon, 16 Dec 2019 at 17:43, Patrick DELAUNAY <patrick.delaunay@st.com>
wrote:

> Hi,
>
> > From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Sughosh Ganu
> > Sent: vendredi 13 décembre 2019 08:14
> >
> > Add a uclass for reading a random number seed from a random number
> generator
> > device.
> >
> > Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> > Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
> > ---
> >  drivers/Kconfig          |  2 ++
> >  drivers/Makefile         |  1 +
> >  drivers/rng/Kconfig      |  7 +++++++
> >  drivers/rng/Makefile     |  6 ++++++
> >  drivers/rng/rng-uclass.c | 23 +++++++++++++++++++++++
> >  include/dm/uclass-id.h   |  1 +
> >  include/rng.h            | 30 ++++++++++++++++++++++++++++++
> >  7 files changed, 70 insertions(+)
> >  create mode 100644 drivers/rng/Kconfig
> >  create mode 100644 drivers/rng/Makefile  create mode 100644
> drivers/rng/rng-
> > uclass.c  create mode 100644 include/rng.h
>

<snip>


> > diff --git a/include/rng.h b/include/rng.h new file mode 100644 index
> > 0000000..61d5da9
> > --- /dev/null
> > +++ b/include/rng.h
> > @@ -0,0 +1,30 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * Copyright (c) 2019, Linaro Limited
> > + */
> > +
> > +#if !defined _RNG_H_
> > +#define _RNG_H_
> > +
> > +#include <dm.h>
> > +
> > +/**
> > + * dm_rng_read() - read a random number seed from the rng device
> > + * @buffer:  input buffer to put the read random seed into
> > + * @size:    number of bytes of random seed read
>
> Missing return value here, I propose:
>
> @return zero on success, or -ve error code.
>

Ok. Will add.


>
> > + *
> > + */
> > +int dm_rng_read(struct udevice *dev, void *buffer, size_t size);
> > +
> > +/* struct dm_rng_ops - Operations for the hwrng uclass */ struct
> > +dm_rng_ops {
> > +     /**
> > +      * @read() - read a random number seed
> > +      *
> > +      * @data:       input buffer to read the random seed
> > +      * @max:        total number of bytes to read
>
> Missing return value here, I propose:
>
> @return zero on success, or -ve error code.
>

Ok. Will add.

-sughosh

  reply	other threads:[~2019-12-16 18:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13  7:14 [PATCH v3 0/8] Add a random number generator uclass Sughosh Ganu
2019-12-13  7:14 ` [PATCH v3 1/8] dm: rng: Add random number generator(rng) uclass Sughosh Ganu
2019-12-13 12:21   ` Ilias Apalodimas
2019-12-16 11:59   ` Patrick DELAUNAY
2019-12-16 12:13   ` Patrick DELAUNAY
2019-12-16 18:55     ` Sughosh Ganu [this message]
2019-12-13  7:14 ` [PATCH v3 2/8] clk: stm32mp1: Add a clock entry for RNG1 device Sughosh Ganu
2019-12-16  8:55   ` Patrick DELAUNAY
2019-12-13  7:14 ` [PATCH v3 3/8] stm32mp1: rng: Add a driver for random number generator(rng) device Sughosh Ganu
2019-12-16 11:58   ` Patrick DELAUNAY
2019-12-13  7:14 ` [PATCH v3 4/8] configs: stm32mp15: Enable " Sughosh Ganu
2019-12-16 12:00   ` Patrick DELAUNAY
2019-12-13  7:14 ` [PATCH v3 5/8] sandbox: rng: Add a random number generator(rng) driver Sughosh Ganu
2019-12-16 12:30   ` Patrick DELAUNAY
2019-12-16 18:59     ` Sughosh Ganu
2019-12-13  7:14 ` [PATCH v3 6/8] configs: sandbox: Enable random number generator(rng) device Sughosh Ganu
2019-12-16 12:07   ` Patrick DELAUNAY
2019-12-13  7:14 ` [PATCH v3 7/8] test: rng: Add basic test for random number generator(rng) uclass Sughosh Ganu
2019-12-16 12:42   ` Patrick DELAUNAY
2019-12-16 19:01     ` Sughosh Ganu
2019-12-13  7:14 ` [PATCH v3 8/8] virtio: rng: Add a random number generator(rng) driver Sughosh Ganu
2019-12-13 12:21   ` Ilias Apalodimas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADg8p96CzSbrxzgonavRxvSmBniqwb+R2X1Y0R0JtGFLTNO-Cg@mail.gmail.com \
    --to=sughosh.ganu@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.