Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753414AbbGBLQw (ORCPT ); Thu, 2 Jul 2015 07:16:52 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:34185 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbbGBLQo (ORCPT ); Thu, 2 Jul 2015 07:16:44 -0400 Subject: Re: [PATCH v2] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS To: Phil Edworthy , Yoshihiro Shimoda References: <1435822602-22685-1-git-send-email-phil.edworthy@renesas.com> Cc: Greg Kroah-Hartman , Felipe Balbi , Ulrich Hecht , Kishon Vijay Abraham I , Laurent Pinchart , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-sh@vger.kernel.org From: Sergei Shtylyov Message-ID: <55951D98.7050003@cogentembedded.com> Date: Thu, 2 Jul 2015 14:16:40 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <1435822602-22685-1-git-send-email-phil.edworthy@renesas.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1625 Lines: 57 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 [...] > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/