From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kishon Vijay Abraham I Subject: Re: [PATCH v3 04/10] usb: dwc3: use quirks to know if a particualr platform doesn't have PHY Date: Mon, 9 Dec 2013 12:43:37 +0530 Message-ID: <52A56DA1.1010808@ti.com> References: <1385373690-12170-1-git-send-email-kishon@ti.com> <1385373690-12170-5-git-send-email-kishon@ti.com> <20131204144027.GB21055@xps8300> <52A01E86.50406@ti.com> <20131205075828.GA32583@xps8300> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131205075828.GA32583@xps8300> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Heikki Krogerus Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, ijc+devicetree@hellion.org.uk, linux@arm.linux.org.uk, rob@landley.net, pawel.moll@arm.com, linux-doc@vger.kernel.org, tony@atomide.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, balbi@ti.com, grant.likely@linaro.org, rob.herring@calxeda.com, bcousson@baylibre.com, galak@codeaurora.org, swarren@wwwdotorg.org, s.nawrocki@samsung.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org Hi, On Thursday 05 December 2013 01:28 PM, Heikki Krogerus wrote: > Hi, > > On Thu, Dec 05, 2013 at 12:04:46PM +0530, Kishon Vijay Abraham I wrote: >> On Wednesday 04 December 2013 08:10 PM, Heikki Krogerus wrote: >>> On Mon, Nov 25, 2013 at 03:31:24PM +0530, Kishon Vijay Abraham I wrote: >>>> There can be systems which does not have an external phy, so get >>>> phy only if no quirks are added that indicates the PHY is not present. >>>> Introduced two quirk flags to indicate the *absence* of usb2 phy and >>>> usb3 phy. Also remove checking if return value is -ENXIO since it's now >>>> changed to always enable usb_phy layer. >>> >>> Can you guys explain why is something like this needed? Like with >>> clocks and gpios, the device drivers shouldn't need to care any more >>> if the platform has the phys or not. -ENODEV tells you your platform >> >> Shouldn't we report if a particular platform needs a PHY and not able to get >> it. How will a user know if a particular controller is not working because it's >> not able to get and initialize the PHYs? Don't you think in such cases it's >> better to fail (and return from probe) because the controller will not work >> anyway without the PHY? > > My point is that you do not need to separately tell this to the driver > like you do with the quirks (if you did, then you would need to fix > your framework and not hack the drivers). > > Like I said, ENODEV tells you that there is no phy on this platform > for you, allowing you to safely continue. If your phy driver is not > loaded, the framework already returns EPROBE_DEFER, right. Any other right. but that doesn't consider broken dt data. With quirks we'll able to tell if a controller in a particular platform has PHY or not without depending on the dt data. > error when getting the phy you can consider critical. They are the > errors telling you that you do need a phy on this platform, but > something actually went wrong when getting it. Not on all scenarios though :-s Thanks Kishon