linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Phil Edworthy <phil.edworthy@renesas.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Simon Horman <horms@verge.net.au>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-sh@vger.kernel.org
Subject: Re: [PATCH 1/3] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS
Date: Mon, 22 Jun 2015 20:38:57 +0300	[thread overview]
Message-ID: <55884831.6080409@cogentembedded.com> (raw)
In-Reply-To: <1434984151-27274-2-git-send-email-phil.edworthy@renesas.com>

Hello.

On 06/22/2015 05:42 PM, Phil Edworthy wrote:

> These changes allow a PHY driver to trigger a VBUS interrupt and
> to provide the value of VBUS.

> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> ---
>   drivers/usb/renesas_usbhs/common.h     |  2 ++
>   drivers/usb/renesas_usbhs/mod.c        |  3 +++
>   drivers/usb/renesas_usbhs/mod_gadget.c | 38 ++++++++++++++++++++++++++++++++++
>   3 files changed, 43 insertions(+)

> diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h
> index 8c5fc12..94a7aeb 100644
> --- a/drivers/usb/renesas_usbhs/common.h
> +++ b/drivers/usb/renesas_usbhs/common.h
> @@ -255,6 +255,8 @@ struct usbhs_priv {
>   	struct renesas_usbhs_driver_param	dparam;
>
>   	struct delayed_work notify_hotplug_work;
> +	int vbus_is_indirect;

    s/int/bool/.

> +	int vbus_indirect_value;

    Likewise.

>   	struct platform_device *pdev;
>
>   	struct extcon_dev *edev;
[...]
> diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
> index dc2aa32..2cfdb50 100644
> --- a/drivers/usb/renesas_usbhs/mod_gadget.c
> +++ b/drivers/usb/renesas_usbhs/mod_gadget.c
[...]
> @@ -891,6 +895,17 @@ static int usbhsg_gadget_start(struct usb_gadget *gadget,
>   	/* first hook up the driver ... */
>   	gpriv->driver = driver;
>
> +	/* connect to bus through transceiver */
> +	if (!IS_ERR_OR_NULL(gpriv->transceiver)) {
> +		ret = otg_set_peripheral(gpriv->transceiver->otg,
> +					&gpriv->gadget);
> +		if (ret) {
> +			dev_info(dev, "%s: can't bind to transceiver\n",

    dev_err().

[...]
> @@ -994,6 +1028,10 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
>   		goto usbhs_mod_gadget_probe_err_gpriv;
>   	}
>
> +	gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
> +	dev_info(dev, "%s transceiver found\n",
> +		 gpriv->transceiver ? "" : "No");

	dev_info(dev, "%stransceiver found\n",
		 gpriv->transceiver ? "" : "no ");

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2015-06-22 17:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 14:42 [PATCH 0/3] R-Car Gen2 USB0 Host/Function switching Phil Edworthy
2015-06-22 14:42 ` [PATCH 1/3] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS Phil Edworthy
2015-06-22 17:38   ` Sergei Shtylyov [this message]
2015-06-22 14:42 ` [PATCH 2/3] phy: rcar-gen2 usb: Add Host/Function switching for USB0 Phil Edworthy
2015-06-22 16:13   ` Kishon Vijay Abraham I
2015-07-02  8:22   ` Kishon Vijay Abraham I
2015-07-02 12:45     ` Phil Edworthy
2015-06-22 14:42 ` [PATCH 3/3] arm: koelsch: make USB0 perform Host/Function switching Phil Edworthy
2015-06-22 17:43   ` Sergei Shtylyov
2015-06-22 17:49     ` Sergei Shtylyov
2015-07-01 15:10       ` Phil Edworthy

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=55884831.6080409@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=horms@verge.net.au \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=phil.edworthy@renesas.com \
    --cc=yoshihiro.shimoda.uh@renesas.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).