All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH 5/5] test: Add gpio-sysinfo test
Date: Thu, 4 Mar 2021 23:08:35 -0500	[thread overview]
Message-ID: <CAPnjgZ1TB4bZ1irA6emR1tMd4OMQy_6hVJjxdKdouUNNHXJ0jQ@mail.gmail.com> (raw)
In-Reply-To: <20210301204603.2730666-6-sean.anderson@seco.com>

On Mon, 1 Mar 2021 at 15:46, Sean Anderson <sean.anderson@seco.com> wrote:
>
> This adds a test for the gpio-sysinfo driver.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
>  arch/sandbox/dts/test.dts |  7 ++++
>  test/dm/Makefile          |  1 +
>  test/dm/sysinfo-gpio.c    | 69 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 77 insertions(+)
>  create mode 100644 test/dm/sysinfo-gpio.c
>

Reviewed-by: Simon Glass <sjg@chromium.org>

nit below

> diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
> index e95f4631bf..6137061d7a 100644
> --- a/arch/sandbox/dts/test.dts
> +++ b/arch/sandbox/dts/test.dts
> @@ -1340,6 +1340,13 @@
>                 compatible = "sandbox,sysinfo-sandbox";
>         };
>
> +       sysinfo-gpio {
> +               compatible = "gpio-sysinfo";
> +               gpios = <&gpio_a 15>, <&gpio_a 16>, <&gpio_a 17>;
> +               revisions = <19>, <5>;
> +               names = "rev_a", "foo";
> +       };
> +
>         some_regmapped-bus {
>                 #address-cells = <0x1>;
>                 #size-cells = <0x1>;
> diff --git a/test/dm/Makefile b/test/dm/Makefile
> index e70e50f402..2ba81ee76b 100644
> --- a/test/dm/Makefile
> +++ b/test/dm/Makefile
> @@ -93,5 +93,6 @@ obj-$(CONFIG_SCMI_FIRMWARE) += scmi.o
>  ifneq ($(CONFIG_PINMUX),)
>  obj-$(CONFIG_PINCONF) += pinmux.o
>  endif
> +obj-$(CONFIG_SYSINFO_GPIO) += sysinfo-gpio.o
>  endif
>  endif # !SPL
> diff --git a/test/dm/sysinfo-gpio.c b/test/dm/sysinfo-gpio.c
> new file mode 100644
> index 0000000000..a700352ff8
> --- /dev/null
> +++ b/test/dm/sysinfo-gpio.c
> @@ -0,0 +1,69 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2021 Sean Anderson <sean.anderson@seco.com>
> + */
> +
> +#include <common.h>
> +#include <dm.h>
> +#include <log.h>
> +#include <dm/test.h>

put at end

> +#include <sysinfo.h>
> +#include <test/test.h>

then this after dm/test.h


> +#include <test/ut.h>
> +#include <asm/gpio.h>
> +

      reply	other threads:[~2021-03-05  4:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 20:45 [PATCH 0/5] sysinfo: Add gpio sysinfo driver Sean Anderson
2021-03-01 20:45 ` [PATCH 1/5] dm: gpio: Fix gpio_get_list_count failing with livetree Sean Anderson
2021-03-05  4:08   ` Simon Glass
2021-03-01 20:46 ` [PATCH 2/5] sysinfo: Provide some global/default IDs Sean Anderson
2021-03-05  4:08   ` Simon Glass
2021-03-05 14:57     ` Sean Anderson
2021-03-01 20:46 ` [PATCH 3/5] sysinfo: Require that sysinfo_detect be called before other methods Sean Anderson
2021-03-05  4:08   ` Simon Glass
2021-03-05 15:12     ` Sean Anderson
2021-03-05 16:39       ` Simon Glass
2021-03-01 20:46 ` [PATCH 4/5] sysinfo: Add gpio-sysinfo driver Sean Anderson
2021-03-01 21:07   ` Sean Anderson
2021-03-05  4:08     ` Simon Glass
2021-03-05 15:19       ` Sean Anderson
2021-03-05 16:39         ` Simon Glass
2021-03-05 17:24           ` Sean Anderson
2021-03-05 19:43             ` Simon Glass
2021-03-01 20:46 ` [PATCH 5/5] test: Add gpio-sysinfo test Sean Anderson
2021-03-05  4:08   ` Simon Glass [this message]

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=CAPnjgZ1TB4bZ1irA6emR1tMd4OMQy_6hVJjxdKdouUNNHXJ0jQ@mail.gmail.com \
    --to=sjg@chromium.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.