From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 822C4C3A5A5 for ; Thu, 5 Sep 2019 08:53:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60E29206BA for ; Thu, 5 Sep 2019 08:53:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730959AbfIEIxH (ORCPT ); Thu, 5 Sep 2019 04:53:07 -0400 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:38385 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732205AbfIEIxG (ORCPT ); Thu, 5 Sep 2019 04:53:06 -0400 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id 079563C005E; Thu, 5 Sep 2019 10:53:04 +0200 (CEST) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0sKHFPSkMrKD; Thu, 5 Sep 2019 10:52:58 +0200 (CEST) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 758703C00C5; Thu, 5 Sep 2019 10:52:58 +0200 (CEST) Received: from vmlxhi-070.adit-jv.com (10.72.93.148) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Thu, 5 Sep 2019 10:52:57 +0200 Date: Thu, 5 Sep 2019 10:52:51 +0200 From: veeraiyan chidambaram To: Yoshihiro Shimoda CC: Felipe Balbi , Greg Kroah-Hartman , Geert Uytterhoeven , Linux-Renesas , "linux-usb@vger.kernel.org" , Andrew Gabbasov , "REE erosca@DE.ADIT-JV.COM" , Veeraiyan Chidambaram Subject: Re: [PATCH v2] usb: gadget: udc: renesas_usb3: add suspend event support Message-ID: <20190905085251.GA28016@vmlxhi-070.adit-jv.com> References: <1567608481-771-1-git-send-email-external.veeraiyan.c@de.adit-jv.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.72.93.148] Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hello Shimoda-san, Thanks a lot . On Thu, Sep 05, 2019 at 02:09:42AM +0000, Yoshihiro Shimoda wrote: > Hi Veeraiyan, > > Thank you for the patch! > > > From: Veeraiyan Chidambaram, Sent: Wednesday, September 4, 2019 11:48 PM > > > --- a/drivers/usb/gadget/udc/renesas_usb3.c > > +++ b/drivers/usb/gadget/udc/renesas_usb3.c > > @@ -767,6 +767,20 @@ static void usb3_irq_epc_int_1_resume(struct renesas_usb3 *usb3) > > usb3_transition_to_default_state(usb3, false); > > } > > > > +static void usb3_irq_epc_int_1_suspend(struct renesas_usb3 *usb3) > > +{ > > + usb3_disable_irq_1(usb3, USB_INT_1_B2_SPND); > > + > > + if (usb3->driver && > > + usb3->driver->suspend && > > As I mentioned on v1 patch [1], I'd like to remove these conditions. > After fixed it, > > Reviewed-by: Yoshihiro Shimoda > > [1] https://patchwork.kernel.org/patch/11129797/#22862513 I have create V2 patch [1], please review. [1] https://patchwork.kernel.org/patch/11132433/ Best regards, Veeraiyan chidambaram > Yoshihiro Shimoda > > > + usb3->gadget.speed != USB_SPEED_UNKNOWN && > > + usb3->gadget.state != USB_STATE_NOTATTACHED) { > > + if (usb3->driver && usb3->driver->suspend) > > + usb3->driver->suspend(&usb3->gadget); > > + usb_gadget_set_state(&usb3->gadget, USB_STATE_SUSPENDED); > > + } > > +} > > + > > static void usb3_irq_epc_int_1_disable(struct renesas_usb3 *usb3) > > { > > usb3_stop_usb3_connection(usb3); > > @@ -852,6 +866,9 @@ static void usb3_irq_epc_int_1(struct renesas_usb3 *usb3, u32 int_sta_1) > > if (int_sta_1 & USB_INT_1_B2_RSUM) > > usb3_irq_epc_int_1_resume(usb3); > > > > + if (int_sta_1 & USB_INT_1_B2_SPND) > > + usb3_irq_epc_int_1_suspend(usb3); > > + > > if (int_sta_1 & USB_INT_1_SPEED) > > usb3_irq_epc_int_1_speed(usb3); > > > > -- > > 2.7.4 >