Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753446AbbGBMBZ (ORCPT ); Thu, 2 Jul 2015 08:01:25 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:57609 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753090AbbGBMBS convert rfc822-to-8bit (ORCPT ); Thu, 2 Jul 2015 08:01:18 -0400 X-IronPort-AV: E=Sophos;i="5.15,392,1432566000"; d="scan'208";a="189595016" From: Phil Edworthy To: Sergei Shtylyov , Yoshihiro Shimoda 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" Subject: RE: [PATCH v2] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS Thread-Topic: [PATCH v2] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS Thread-Index: AQHQtJov6QAOeJ5fNUapptyc9faHp53IB+4AgAAMNFA= Date: Thu, 2 Jul 2015 12:01:13 +0000 Message-ID: References: <1435822602-22685-1-git-send-email-phil.edworthy@renesas.com> <55951D98.7050003@cogentembedded.com> In-Reply-To: <55951D98.7050003@cogentembedded.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: cogentembedded.com; dkim=none (message not signed) header.d=none; x-originating-ip: [193.141.220.21] x-microsoft-exchange-diagnostics: 1;SIXPR06MB0921;5:aMV5W8GTW2KyivU+UQIYGk9UiiMyvND0qGir91FUf9eRoB5IxB0PH253qW6zvK3zW5zy1OC0v8i5TjzOfy9ZQZsztJg5u8c/cVc/9zac5GRMQn5gjPdr02aq78c3CLCtblEasA+IRS7j9XGQYR9qoQ==;24:xefIqGEUoLmMPURYZ6Fn7QmBVm7avb5+tKcBX1UaH09HDohhYCIbEXWgkFJ+0jfgUMD1VrN0tWqpKFYGdHj10dlOpYWBp/NrR2IgYWwvVS4=;20:u1rGiGXqmMuU+/g0Uw+899OoAPHTcZ3HE15sDpQPQYdnXG1du2TwppPm5ZxsRTdSe6maUjmoYC+VLLrpx3mL0deIuNbw8h1aWDoDDV+eRX7WNENAwABU+t/nP92gFydxUxoh5QtEdCxGUklo+R+jQY77sIs2RdPW7oYZ2m2inuY= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB0921; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:SIXPR06MB0921;BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB0921; x-forefront-prvs: 06259BA5A2 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(24454002)(51704005)(479174004)(87936001)(2656002)(5002640100001)(86362001)(5001960100002)(76576001)(2900100001)(50986999)(2950100001)(76176999)(77096005)(102836002)(189998001)(33656002)(74316001)(62966003)(122556002)(46102003)(77156002)(54356999)(66066001)(5001770100001)(106116001)(5003600100002)(19580395003)(19580405001)(40100003)(92566002)(4001450100001)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:SIXPR06MB0921;H:SIXPR06MB0639.apcprd06.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2015 12:01:13.6924 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB0921 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1868 Lines: 68 Hi Sergei, On 02 July 2015 12:17, Sergei wrote: > To: Phil Edworthy; Yoshihiro Shimoda > 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/. Ok. > > + 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. :-( Ah, sorry, I missed that comment. > [...] > > WBR, Sergei Thanks Phil -- 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/