lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55951D98.7050003@cogentembedded.com>
Date:	Thu, 2 Jul 2015 14:16:40 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Phil Edworthy <phil.edworthy@...esas.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Felipe Balbi <balbi@...com>,
	Ulrich Hecht <ulrich.hecht@...il.com>,
	Kishon Vijay Abraham I <kishon@...com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	linux-sh@...r.kernel.org
Subject: Re: [PATCH v2] usb: renesas_usbhs: Allow an OTG PHY driver to provide
 VBUS

Hello.

On 7/2/2015 10:36 AM, 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@...esas.com>

[...]

> diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
> index dc2aa32..51b63f9 100644
> --- a/drivers/usb/renesas_usbhs/mod_gadget.c
> +++ b/drivers/usb/renesas_usbhs/mod_gadget.c
[...]
> @@ -947,12 +966,27 @@ static int usbhsg_set_selfpowered(struct usb_gadget *gadget, int is_self)
>   	return 0;
>   }
>
> +static int usbhsg_vbus_session(struct usb_gadget *gadget, int is_active)
> +{
> +	struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget);
> +	struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
> +	struct platform_device *pdev = usbhs_priv_to_pdev(priv);
> +
> +	priv->vbus_is_indirect = 1;

    s/1/true/.

> +	priv->vbus_indirect_value = !!is_active;
> +
> +	renesas_usbhs_call_notify_hotplug(pdev);
> +
> +	return 0;
> +}
> +
[...]
> @@ -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");

    Hm, I told you to make this message cleaner, and you haven't. :-(

[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ