From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753447AbbCKPYe (ORCPT ); Wed, 11 Mar 2015 11:24:34 -0400 Received: from muru.com ([72.249.23.125]:36453 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbbCKPYc (ORCPT ); Wed, 11 Mar 2015 11:24:32 -0400 Date: Wed, 11 Mar 2015 08:19:27 -0700 From: Tony Lindgren To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-usb , Brian Hutchinson , Felipe Balbi Subject: Re: [PATCH] phy: Add a driver for dm816x USB PHY Message-ID: <20150311151927.GV5264@atomide.com> References: <20150309205157.GE5140@atomide.com> <550011B1.5010706@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <550011B1.5010706@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Kishon Vijay Abraham I [150311 02:58]: > Hi Tony, > > On Tuesday 10 March 2015 02:21 AM, Tony Lindgren wrote: > >Add a minimal driver for dm816x USB. Otherwise we can just use > >the existing musb_am335x and musb_dsps on dm816x. > > If we can use an existing driver, I'd prefer that. Hmm that needs rewording.. Should say that with this phy driver musb works with existing musb_dsps usb driver on dm816x. There is no existing driver, the closest similar thing is the legacy drivers/usb/musb/davinci.c that has no separate phy driver. > >+static int dm816x_usb_phy_power_off(struct phy *x) > >+{ > >+ struct dm816x_usb_phy *phy = phy_get_drvdata(x); > >+ > >+ pm_runtime_put(phy->dev); > > phy core takes care of invoking pm_runtime_put on power_off. > So this function shouldn't be needed at all. OK will remove the pm_runtime calls for all of them. ... > >+ phy->refclk = devm_clk_get(phy->dev, "refclk"); > >+ if (IS_ERR(phy->refclk)) > >+ return PTR_ERR(phy->refclk); > >+ > >+ generic_phy = devm_phy_create(phy->dev, NULL, &ops); > >+ if (IS_ERR(generic_phy)) > >+ return PTR_ERR(generic_phy); > > Just invoke pm_runtime_enable before phy_create and phy core will take care of > invoking all pm_runtime functions at appropriate time. OK will. Thanks, Tony