Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932420AbbFJCMd (ORCPT ); Tue, 9 Jun 2015 22:12:33 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:58762 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752289AbbFJCMX convert rfc822-to-8bit (ORCPT ); Tue, 9 Jun 2015 22:12:23 -0400 From: John Youn To: "dinguyen@opensource.altera.com" , "John.Youn@synopsys.com" CC: "dinh.linux@gmail.com" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Gregory Herrero , Mian Yousaf Kaukab , Felipe Balbi Subject: Re: [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition Thread-Topic: [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition Thread-Index: AQHQmCVkNwjfvh9MQk2mneSsviE8jw== Date: Wed, 10 Jun 2015 02:12:21 +0000 Message-ID: <2B3535C5ECE8B5419E3ECBE30077290901752463ED@US01WEMBX2.internal.synopsys.com> References: <1432693565-31475-1-git-send-email-dinguyen@opensource.altera.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.9.138.217] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1664 Lines: 48 Hi Dinh, Responding again to the proper message to add linux-usb. And also added more comments. On 5/26/2015 7:32 PM, dinguyen@opensource.altera.com wrote: > From: Dinh Nguyen > > For platforms that use a ULPI phy, we should enable the external VbusValid > signal instead. I don't think it should be for all ULPI phys. Though I'm not that familiar with ULPI. > > Signed-off-by: Dinh Nguyen > Cc: Gregory Herrero > Cc: Mian Yousaf Kaukab > Cc: Felipe Balbi > --- > drivers/usb/dwc2/core.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c > index e5b546f..08ffdc6 100644 > --- a/drivers/usb/dwc2/core.c > +++ b/drivers/usb/dwc2/core.c > @@ -807,6 +807,11 @@ int dwc2_core_init(struct dwc2_hsotg *hsotg, bool select_phy, int irq) > if (hsotg->core_params->ts_dline > 0) > usbcfg |= GUSBCFG_TERMSELDLPULSE; > > + /* Set external VBUS indicator as needed. */ > + if (hsotg->core_params->phy_type == DWC2_PHY_TYPE_PARAM_ULPI) > + usbcfg |= (GUSBCFG_ULPI_INT_VBUS_IND | > + GUSBCFG_INDICATORPASSTHROUGH); > + I think these should all be conditional on using the external vbus, and probably also on the features themselves since it will depend on the PHY and platform how you want to set these bits. John -- 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/