All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ruchika Kharwar <ruchika@ti.com>
Cc: linux-usb@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-omap@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Landley <rob@landley.net>
Subject: Re: [PATCH] usb: dwc3: Addition of "dr_mode" dt property.
Date: Fri, 31 May 2013 00:19:33 +0400	[thread overview]
Message-ID: <51A7B455.1000205@cogentembedded.com> (raw)
In-Reply-To: <1369944894-3176-1-git-send-email-ruchika@ti.com>

Hello.

On 05/31/2013 12:14 AM, Ruchika Kharwar wrote:

> This patch adds an optional parameter "dr_mode" to the dwc3 core device node.
> In the case the compile flag for the DWC3 controller is set to
> "USB_DWC3_DUAL_ROLE" a device tree could restrain to either functionality of
> host or gadget. In the case the device tree does not use this optional flag or
> specifies it superfluously to "drd" the functionality will be that
> of a dual role device.
>
> Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
> ---
>   Documentation/devicetree/bindings/usb/dwc3.txt |    3 ++-
>   drivers/usb/dwc3/core.c                        |   21 +++++++++++++++++----
>   2 files changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
> index 7a95c65..2f5d584 100644
> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
> @@ -10,7 +10,8 @@ Required properties:
>   
>   Optional properties:
>    - tx-fifo-resize: determines if the FIFO *has* to be reallocated.
> -
> + - dr_mode: determines the mode of core. Supported modes are "gadget", "host"
> +   and "drd".
>   This is usually a subnode to DWC3 glue to which it is connected.
>   
>   dwc3@4a030000 {
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index c35d49d..e11660a 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -378,7 +378,7 @@ static int dwc3_probe(struct platform_device *pdev)
>   	void			*mem;
>   
>   	u8			mode;
> -
> +	char			*dr_mode;

    Please leave empty line here, after the declarations.

>   	mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL);
>   	if (!mem) {
>   		dev_err(dev, "not enough memory\n");
>

WBR, Sergei


  reply	other threads:[~2013-05-30 20:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 20:14 [PATCH] usb: dwc3: Addition of "dr_mode" dt property Ruchika Kharwar
2013-05-30 20:19 ` Sergei Shtylyov [this message]
     [not found] ` <51A7B725.1090103@ti.com>
2013-05-30 20:35   ` Dan Murphy
2013-05-30 22:47     ` Ruchika Kharwar
2013-05-31  8:10 ` Michael Grzeschik
  -- strict thread matches above, loose matches on Subject: below --
2013-05-30 20:31 Ruchika Kharwar
2013-06-03 12:09 ` Michael Grzeschik
2013-05-30 17:56 Ruchika Kharwar
2013-05-30 19:53 ` Dan Murphy
2013-05-31  4:33   ` Felipe Balbi

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=51A7B455.1000205@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rob@landley.net \
    --cc=ruchika@ti.com \
    /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.