Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933238AbdDENBz (ORCPT ); Wed, 5 Apr 2017 09:01:55 -0400 Received: from mail-oi0-f48.google.com ([209.85.218.48]:34401 "EHLO mail-oi0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933013AbdDENAq (ORCPT ); Wed, 5 Apr 2017 09:00:46 -0400 MIME-Version: 1.0 In-Reply-To: <8aa2cc42-6fdc-5574-4449-f05f6d5cbd38@ti.com> References: <1490704052-11314-1-git-send-email-raviteja.garimella@broadcom.com> <1490704052-11314-3-git-send-email-raviteja.garimella@broadcom.com> <8aa2cc42-6fdc-5574-4449-f05f6d5cbd38@ti.com> From: Raviteja Garimella Date: Wed, 5 Apr 2017 18:30:45 +0530 Message-ID: Subject: Re: [PATCH v4 2/3] Broadcom USB DRD Phy driver for Northstar2 To: Kishon Vijay Abraham I Cc: Rob Herring , Mark Rutland , Ray Jui , Scott Branden , Jon Mason , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, BCM Kernel Feedback , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1721 Lines: 48 Hi Kishon, On Wed, Apr 5, 2017 at 4:30 PM, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 28 March 2017 05:57 PM, Raviteja Garimella wrote: >> This is driver for USB DRD Phy used in Broadcom's Northstar2 >> SoC. The phy can be configured to be in Device mode or Host >> mode based on the type of cable connected to the port. The >> driver registers to extcon framework to get appropriate >> connect events for Host/Device cables connect/disconnect >> states based on VBUS and ID interrupts. > > $patch should be phy: phy-bcm-ns2-usbdrd: USB DRD Phy driver for Broadcoms > Northstar2. > Will do. > Sorry for not letting you know this earlier. But I feel the design of the > driver should be changed. Extcon shouldn't be used here. The extcon > notifications should be sent to the consumer driver and the consumer driver > should be responsible for invoking the phy ops. > The consumer drivers here would be a UDC driver (USB device controller), EHCI and OHCI host controller drivers. I was already suggested in UDC driver review to deal with extcon in Phy driver. This phy connects to 2 host controllers, and one device controller. That's the design in Broadcom Northstar2 platform. The values of the VBUS and ID pins of this port are determined based on the type of the cable (device cable or host cable). And. phy has to be configured accordingly. > The phy ops being invoked during extcon events doesn't look right. Could you please elaborate on the concern, so that we can think of mitigating those issues in this driver? Since we are dealing with phy init/shutdown in this driver itself, are you okay with moving the extcon handling code out of phy ops ? Thanks, Ravi > > Thanks > Kishon