All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: u-boot@lists.denx.de
Subject: [PATCH 09/10] usb: Use ofnode as usb_get_dr_mode() parameter
Date: Wed, 19 Feb 2020 08:49:25 +0100	[thread overview]
Message-ID: <a7131adf-7e14-57ba-5769-8b7882aae4b1@baylibre.com> (raw)
In-Reply-To: <20200219015447.19392-10-kever.yang@rock-chips.com>

On 19/02/2020 02:54, Kever Yang wrote:
> ofnode is more common and no need to convert to offset after we migrate
> other API to use ofnode.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  drivers/usb/cdns3/core.c           | 2 +-
>  drivers/usb/common/common.c        | 7 +++----
>  drivers/usb/dwc3/dwc3-generic.c    | 6 +++---
>  drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +-
>  drivers/usb/gadget/dwc2_udc_otg.c  | 5 ++---
>  drivers/usb/host/dwc3-sti-glue.c   | 2 +-
>  drivers/usb/host/ehci-mx6.c        | 2 +-
>  drivers/usb/host/xhci-dwc3.c       | 3 +--
>  drivers/usb/musb-new/ti-musb.c     | 2 +-
>  include/linux/usb/otg.h            | 4 ++--
>  10 files changed, 16 insertions(+), 19 deletions(-)
> 

[...]

> diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
> index a55def5aba..4300f711a9 100644
> --- a/drivers/usb/common/common.c
> +++ b/drivers/usb/common/common.c
> @@ -7,7 +7,7 @@
>   */
>  
>  #include <common.h>
> -#include <linux/libfdt.h>
> +#include <dm.h>
>  #include <linux/usb/otg.h>
>  #include <linux/usb/ch9.h>
>  
> @@ -20,13 +20,12 @@ static const char *const usb_dr_modes[] = {
>  	[USB_DR_MODE_OTG]		= "otg",
>  };
>  
> -enum usb_dr_mode usb_get_dr_mode(int node)
> +enum usb_dr_mode usb_get_dr_mode(ofnode node)
>  {
> -	const void *fdt = gd->fdt_blob;
>  	const char *dr_mode;
>  	int i;
>  
> -	dr_mode = fdt_getprop(fdt, node, "dr_mode", NULL);
> +	dr_mode = ofnode_read_string(node, "dr_mode");
>  	if (!dr_mode) {
>  		pr_err("usb dr_mode not found\n");
>  		return USB_DR_MODE_UNKNOWN;
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index ced0f53bfd..7178f12b47 100644

[..]

> diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
> index 832bcd70ff..d4453f8784 100644
> --- a/drivers/usb/dwc3/dwc3-meson-g12a.c
> +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
> @@ -393,7 +393,7 @@ static int dwc3_meson_g12a_probe(struct udevice *dev)
>  	}
>  #endif
>  
> -	priv->otg_mode = usb_get_dr_mode(dev_of_offset(dev));
> +	priv->otg_mode = usb_get_dr_mode(dev->node);
>  
>  	ret = dwc3_meson_g12a_usb_init(priv);
>  	if (ret)

For drivers/usb/dwc3/dwc3-meson-g12a.c:
Acked-by: Neil Armstrong <narmstrong@baylibre.com>

WARNING: multiple messages have this Message-ID (diff)
From: "Neil Armstrong" <narmstrong@baylibre.com>
To: Kever Yang <kever.yang@rock-chips.com>, u-boot@lists.denx.de
Cc: frank.wang@rock-chips.com, Adam Ford <aford173@gmail.com>,
	Bin Meng <bmeng.cn@gmail.com>,
	Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,
	Fabio Estevam <festevam@gmail.com>,
	Igor Opaniuk <igor.opaniuk@toradex.com>,
	Jean-Jacques Hiblot <jjhiblot@ti.com>,
	Lukasz Majewski <lukma@denx.de>, Marek Vasut <marex@denx.de>,
	Simon Glass <sjg@chromium.org>,
	Vignesh Raghavendra <vigneshr@ti.com>, Ye Li <ye.li@nxp.com>,
	u-boot-amlogic@groups.io
Subject: Re: [PATCH 09/10] usb: Use ofnode as usb_get_dr_mode() parameter
Date: Wed, 19 Feb 2020 08:49:25 +0100	[thread overview]
Message-ID: <a7131adf-7e14-57ba-5769-8b7882aae4b1@baylibre.com> (raw)
In-Reply-To: <20200219015447.19392-10-kever.yang@rock-chips.com>

On 19/02/2020 02:54, Kever Yang wrote:
> ofnode is more common and no need to convert to offset after we migrate
> other API to use ofnode.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  drivers/usb/cdns3/core.c           | 2 +-
>  drivers/usb/common/common.c        | 7 +++----
>  drivers/usb/dwc3/dwc3-generic.c    | 6 +++---
>  drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +-
>  drivers/usb/gadget/dwc2_udc_otg.c  | 5 ++---
>  drivers/usb/host/dwc3-sti-glue.c   | 2 +-
>  drivers/usb/host/ehci-mx6.c        | 2 +-
>  drivers/usb/host/xhci-dwc3.c       | 3 +--
>  drivers/usb/musb-new/ti-musb.c     | 2 +-
>  include/linux/usb/otg.h            | 4 ++--
>  10 files changed, 16 insertions(+), 19 deletions(-)
> 

[...]

> diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
> index a55def5aba..4300f711a9 100644
> --- a/drivers/usb/common/common.c
> +++ b/drivers/usb/common/common.c
> @@ -7,7 +7,7 @@
>   */
>  
>  #include <common.h>
> -#include <linux/libfdt.h>
> +#include <dm.h>
>  #include <linux/usb/otg.h>
>  #include <linux/usb/ch9.h>
>  
> @@ -20,13 +20,12 @@ static const char *const usb_dr_modes[] = {
>  	[USB_DR_MODE_OTG]		= "otg",
>  };
>  
> -enum usb_dr_mode usb_get_dr_mode(int node)
> +enum usb_dr_mode usb_get_dr_mode(ofnode node)
>  {
> -	const void *fdt = gd->fdt_blob;
>  	const char *dr_mode;
>  	int i;
>  
> -	dr_mode = fdt_getprop(fdt, node, "dr_mode", NULL);
> +	dr_mode = ofnode_read_string(node, "dr_mode");
>  	if (!dr_mode) {
>  		pr_err("usb dr_mode not found\n");
>  		return USB_DR_MODE_UNKNOWN;
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index ced0f53bfd..7178f12b47 100644

[..]

> diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
> index 832bcd70ff..d4453f8784 100644
> --- a/drivers/usb/dwc3/dwc3-meson-g12a.c
> +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
> @@ -393,7 +393,7 @@ static int dwc3_meson_g12a_probe(struct udevice *dev)
>  	}
>  #endif
>  
> -	priv->otg_mode = usb_get_dr_mode(dev_of_offset(dev));
> +	priv->otg_mode = usb_get_dr_mode(dev->node);
>  
>  	ret = dwc3_meson_g12a_usb_init(priv);
>  	if (ret)

For drivers/usb/dwc3/dwc3-meson-g12a.c:
Acked-by: Neil Armstrong <narmstrong@baylibre.com>

  reply	other threads:[~2020-02-19  7:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19  1:54 [PATCH 00/10] usb: Covert to support Live DT Kever Yang
2020-02-19  1:54 ` Kever Yang
2020-02-19  1:54 ` [PATCH 01/10] usb: dwc3-of-simple: Drop redundant inclding header file Kever Yang
2020-02-19  1:54 ` [PATCH 02/10] usb: ehci-msm: Use dev interface to get device address Kever Yang
2020-02-19 18:31   ` Ramon Fried
2020-02-19  1:54 ` [PATCH 03/10] usb: cdns3: Migrate to use ofnode API for bind function Kever Yang
2020-02-19  1:54 ` [PATCH 04/10] usb: dwc3-generic: " Kever Yang
2020-02-19  1:54 ` [PATCH 05/10] usb: dwc3-generic: Use dev_read_addr() instead of devfdt_get_addr() Kever Yang
2020-02-19 17:07   ` Marek Vasut
2020-02-20  1:51     ` Kever Yang
2020-02-20  2:23   ` Simon Glass
2020-02-27  7:33     ` [PATCH 05/10] usb: dwc3-generic: Use dev_read_addr() instead of devfdt_get_addr()【请注意,邮件由sjg@google.com代发】 Kever Yang
2020-02-19  1:54 ` [PATCH 06/10] usb: host: dwc3-sti-glue: Migrate to use ofnode API Kever Yang
2020-02-20  8:53   ` Patrice CHOTARD
2020-02-27  7:26     ` Kever Yang
2020-02-19  1:54 ` [PATCH 07/10] usb: musb-new: " Kever Yang
2020-02-19  1:54 ` [PATCH 08/10] usb: dwc3: core: reorder the header file including sequence Kever Yang
2020-02-19 17:07   ` Marek Vasut
2020-02-19  1:54 ` [PATCH 09/10] usb: Use ofnode as usb_get_dr_mode() parameter Kever Yang
2020-02-19  1:54   ` Kever Yang
2020-02-19  7:49   ` Neil Armstrong [this message]
2020-02-19  7:49     ` Neil Armstrong
2020-02-19  1:54 ` [PATCH 10/10] usb: Use ofnode as usb_get_maximum_speed() parameter Kever Yang

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=a7131adf-7e14-57ba-5769-8b7882aae4b1@baylibre.com \
    --to=narmstrong@baylibre.com \
    --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.