All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH 1/3] dm: add cells_count parameter in *_count_phandle_with_args
Date: Sun, 4 Oct 2020 19:42:01 -0600	[thread overview]
Message-ID: <CAPnjgZ02X_Z8sbxtjj3v8AcDaskjBpONVRxRfigJ4vQOW7ykiQ@mail.gmail.com> (raw)
In-Reply-To: <20200925074116.16068-1-patrick.delaunay@st.com>

On Fri, 25 Sep 2020 at 01:41, Patrick Delaunay <patrick.delaunay@st.com> wrote:
>
> The cell_count argument is required when cells_name is NULL.
>
> This patch adds this parameter in live tree API
> - of_count_phandle_with_args
> - ofnode_count_phandle_with_args
> - dev_count_phandle_with_args
>
> This parameter solves issue when these API is used to count
> the number of element of a cell without cell name. This parameter
> allow to force the size cell.
>
> For example:
>   count = dev_count_phandle_with_args(dev, "array", NULL, 3);
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
> It is linked to previous serie [1] but it is not a blocking point today
> as no user use this API with cells_name = NULL
> + dev_count_phandle_with_args
> + ofnode_count_phandle_with_args
>
> [1/3] was Previously sent in RFC [2] + missing impacts in:
>   drivers/net/designware.c
>   drivers/power/domain/power-domain-uclass.c
>   drivers/usb/host/ohci-da8xx.c
>   drivers/usb/host/ohci-generic.c
>
> I also add test in [3/3] for modified API.
>
> But I think it is the good time to modify these functions as they are not
> hugely used.
>
> [1] http://patchwork.ozlabs.org/project/uboot/list/?series=200899
>     "dm: add cells_count parameter in live DT APIs of_parse_phandle_with_args"
> [2] http://patchwork.ozlabs.org/project/uboot/list/?series=200906&state=*
>
>
>  board/st/stm32mp1/stm32mp1.c               | 2 +-
>  drivers/clk/clk-uclass.c                   | 4 ++--
>  drivers/core/of_access.c                   | 7 ++++---
>  drivers/core/ofnode.c                      | 6 +++---
>  drivers/core/read.c                        | 5 +++--
>  drivers/net/designware.c                   | 3 ++-
>  drivers/phy/phy-uclass.c                   | 2 +-
>  drivers/power/domain/power-domain-uclass.c | 2 +-
>  drivers/reset/reset-uclass.c               | 2 +-
>  drivers/usb/host/ehci-generic.c            | 4 ++--
>  drivers/usb/host/ohci-da8xx.c              | 3 ++-
>  drivers/usb/host/ohci-generic.c            | 6 ++++--
>  include/dm/of_access.h                     | 4 +++-
>  include/dm/ofnode.h                        | 3 ++-
>  include/dm/read.h                          | 8 +++++---
>  15 files changed, 36 insertions(+), 25 deletions(-)

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

      parent reply	other threads:[~2020-10-05  1:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25  7:41 [PATCH 1/3] dm: add cells_count parameter in *_count_phandle_with_args Patrick Delaunay
2020-09-25  7:41 ` [PATCH 2/3] fdtdec: correct test on return of fdt_node_offset_by_phandle Patrick Delaunay
2020-10-05  1:42   ` Simon Glass
2020-10-05 21:32   ` Simon Glass
2020-09-25  7:41 ` [PATCH 3/3] test: dm: add test for phandle access functions Patrick Delaunay
2020-10-05  1:42   ` Simon Glass
2020-10-05 21:32   ` Simon Glass
2020-10-05  1:42 ` 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=CAPnjgZ02X_Z8sbxtjj3v8AcDaskjBpONVRxRfigJ4vQOW7ykiQ@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.