mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivek Gautam <gautamvivek1987@gmail.com>
To: Felipe Balbi <balbi@ti.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	gregkh@linuxfoundation.org,
	Vivek Gautam <gautam.vivek@samsung.com>
Subject: Re: [PATCH] usb: dwc3: Set DWC3 context's mode based on selected mode.
Date: Wed, 13 Mar 2013 14:42:22 +0530	[thread overview]
Message-ID: <CAFp+6iFjiOPbZhdpWCq0agWBeSC+Vc19Ff++_3vxa6r-MburWg@mail.gmail.com> (raw)
In-Reply-To: <1362230724-21017-1-git-send-email-gautam.vivek@samsung.com>

Hi Balbi,


On Sat, Mar 2, 2013 at 6:55 PM, Vivek Gautam <gautam.vivek@samsung.com> wrote:
> Now that machines may select the mode of working of DWC3 (HOST only,
> GADGET only or DUAL_ROLE), lets set DWC3 mode based on that
> rather than fixing it to whatever DWC3 hardware says.
> This way we can skip initializing Gadget/Host in case
> we are using Host-only/Gadget-only mode respectively.
>

Hope this patch if fine, and mainlinable ?

> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> ---
>
> Changes from RFC patch "usb: dwc3: Set GCTL.PrtCapDir based on selected mode"
>  - Setting the mode in dwc3 context structure based on
>    selected mode in machine, rather than programming PrtCapDir
>
>  drivers/usb/dwc3/core.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 79f335f..be0672f 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -478,7 +478,12 @@ static int dwc3_probe(struct platform_device *pdev)
>                 goto err1;
>         }
>
> -       mode = DWC3_MODE(dwc->hwparams.hwparams0);
> +       if (IS_ENABLED(CONFIG_USB_DWC3_HOST))
> +               mode = DWC3_MODE_HOST;
> +       else if (IS_ENABLED(CONFIG_USB_DWC3_GADGET))
> +               mode = DWC3_MODE_DEVICE;
> +       else
> +               mode = DWC3_MODE_DRD;
>
>         switch (mode) {
>         case DWC3_MODE_DEVICE:
> --
> 1.7.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



-- 
Thanks & Regards
Vivek

  reply	other threads:[~2013-03-13  9:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 13:45 [PATCH RFC] usb: dwc3: Set GCTL.PrtCapDir " Vivek Gautam
2013-02-25  8:17 ` Felipe Balbi
2013-02-25  8:51   ` Vivek Gautam
2013-02-25  9:19     ` Felipe Balbi
2013-02-25  9:29       ` Vivek Gautam
2013-03-02 13:25         ` [PATCH] usb: dwc3: Set DWC3 context's mode " Vivek Gautam
2013-03-13  9:12           ` Vivek Gautam [this message]
2013-03-13  9:14             ` Felipe Balbi
2013-03-13  9:15               ` Vivek Gautam

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=CAFp+6iFjiOPbZhdpWCq0agWBeSC+Vc19Ff++_3vxa6r-MburWg@mail.gmail.com \
    --to=gautamvivek1987@gmail.com \
    --cc=balbi@ti.com \
    --cc=gautam.vivek@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®