linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Manish Narani <manish.narani@xilinx.com>,
	robh+dt@kernel.org, mark.rutland@arm.com,
	catalin.marinas@arm.com, will.deacon@arm.com,
	michal.simek@xilinx.com, soren.brinkmann@xilinx.com,
	gregkh@linuxfoundation.org, mathias.nyman@intel.com,
	agraf@suse.de, bharatku@xilinx.com,
	punnaiah.choudary.kalluri@xilinx.com, dhdang@apm.com,
	marc.zyngier@arm.com, mnarani@xilinx.com,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Cc: anirudh@xilinx.com, anuragku@xilinx.com
Subject: Re: [RFC PATCH] usb: dwc3: host: add support for OTG in DWC3 host driver
Date: Wed, 04 Jan 2017 15:32:40 +0200	[thread overview]
Message-ID: <87o9znvtl3.fsf@linux.intel.com> (raw)
In-Reply-To: <1483536181-22356-5-git-send-email-mnarani@xilinx.com>

[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]


Hi,

Manish Narani <manish.narani@xilinx.com> writes:
> This patch adds support for OTG host mode initialization in DWC3
> host driver. Before the host initialization sequence begins. The
> driver has to make sure the no OTG peripheral mode is enabled.
>
> Signed-off-by: Manish Narani <mnarani@xilinx.com>
> ---
>  drivers/usb/dwc3/host.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
> index 487f0ff..4caa3fe 100644
> --- a/drivers/usb/dwc3/host.c
> +++ b/drivers/usb/dwc3/host.c
> @@ -16,6 +16,8 @@
>   */
>  
>  #include <linux/platform_device.h>
> +#include <linux/usb.h>
> +#include <linux/usb/hcd.h>
>  
>  #include "core.h"
>  
> @@ -111,6 +113,18 @@ int dwc3_host_init(struct dwc3 *dwc)
>  	phy_create_lookup(dwc->usb3_generic_phy, "usb3-phy",
>  			  dev_name(dwc->dev));
>  
> +	if (dwc->dr_mode == USB_DR_MODE_OTG) {
> +		struct usb_phy *phy;
> +		/* Switch otg to host mode */
> +		phy = usb_get_phy(USB_PHY_TYPE_USB3);
> +		if (!IS_ERR(phy)) {
> +			if (phy && phy->otg)
> +				otg_set_host(phy->otg,
> +						(struct usb_bus *)(long)1);
> +			usb_put_phy(phy);
> +		}
> +	}

NAK. Don't change default mode for everybody. Default mode should
actually be peripheral, but let's not touch whatever HW designer has
set; at least for now.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-01-04 13:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 13:22 [RFC PATCH] arch: arm64: dts: add USB OTG interrupts support in ZynqMP device tree Manish Narani
2017-01-04 13:22 ` [RFC PATCH] usb: dwc3: add support for OTG driver compilation Manish Narani
2017-01-04 13:31   ` Felipe Balbi
2017-01-05  5:27     ` Manish Narani
2017-01-05  9:20       ` Felipe Balbi
2017-01-04 13:22 ` [RFC PATCH] usb: dwc3: core: add OTG support function calls and modifications Manish Narani
2017-01-04 13:22 ` [RFC PATCH] usb: dwc3: gadget: add support for OTG in gadget framework Manish Narani
2017-01-04 14:03   ` Felipe Balbi
2017-01-04 13:22 ` [RFC PATCH] usb: dwc3: host: add support for OTG in DWC3 host driver Manish Narani
2017-01-04 13:32   ` Felipe Balbi [this message]
2017-01-05 12:24     ` Manish Narani
2017-01-04 13:23 ` [RFC PATCH] usb: dwc3: otg: Adding OTG driver for DWC3 controller Manish Narani
2017-01-04 13:23 ` [RFC PATCH] usb: host: xhci: plat: add support for otg_set_host() call Manish Narani
2017-01-04 13:30 ` [RFC PATCH] arch: arm64: dts: add USB OTG interrupts support in ZynqMP device tree 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=87o9znvtl3.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=agraf@suse.de \
    --cc=anirudh@xilinx.com \
    --cc=anuragku@xilinx.com \
    --cc=bharatku@xilinx.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dhdang@apm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=manish.narani@xilinx.com \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mathias.nyman@intel.com \
    --cc=michal.simek@xilinx.com \
    --cc=mnarani@xilinx.com \
    --cc=punnaiah.choudary.kalluri@xilinx.com \
    --cc=robh+dt@kernel.org \
    --cc=soren.brinkmann@xilinx.com \
    --cc=will.deacon@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).