From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kishon Vijay Abraham I Subject: Re: [PATCH RFC 1/4] phy: Add provision for tuning phy. Date: Wed, 11 Dec 2013 13:47:13 +0530 Message-ID: <52A81F89.4010603@ti.com> References: <1386672926-26885-1-git-send-email-gautam.vivek@samsung.com> <1386672926-26885-2-git-send-email-gautam.vivek@samsung.com> <20131210140142.GB28456@xps8300> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from comal.ext.ti.com ([198.47.26.152]:37725 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743Ab3LKIR0 (ORCPT ); Wed, 11 Dec 2013 03:17:26 -0500 In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Vivek Gautam , Heikki Krogerus Cc: Vivek Gautam , Linux USB Mailing List , "linux-samsung-soc@vger.kernel.org" , linux-omap@vger.kernel.org, "linux-kernel@vger.kernel.org" , Greg KH , Felipe Balbi , Sarah Sharp , Kukjin Kim , Jingoo Han , Julius Werner On Wednesday 11 December 2013 12:08 PM, Vivek Gautam wrote: > Hi, > > > On Tue, Dec 10, 2013 at 7:31 PM, Heikki Krogerus > wrote: >> Hi, > > Thanks for reviewing this. > >> >> On Tue, Dec 10, 2013 at 04:25:23PM +0530, Vivek Gautam wrote: >>> Some PHY controllers may need to tune PHY post-initialization, >>> so that the PHY consumers can call phy-tuning at appropriate >>> point of time. >>> >>> Signed-off-by: vivek Gautam >>> --- >>> drivers/phy/phy-core.c | 20 ++++++++++++++++++++ >>> include/linux/phy/phy.h | 7 +++++++ >>> 2 files changed, 27 insertions(+), 0 deletions(-) >>> >>> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c >>> index 03cf8fb..68dbb90 100644 >>> --- a/drivers/phy/phy-core.c >>> +++ b/drivers/phy/phy-core.c >>> @@ -239,6 +239,26 @@ out: >>> } >>> EXPORT_SYMBOL_GPL(phy_power_off); >>> >>> +int phy_tune(struct phy *phy) >>> +{ >>> + int ret = -ENOTSUPP; >>> + >>> + mutex_lock(&phy->mutex); >>> + if (phy->ops->tune) { >>> + ret = phy->ops->tune(phy); >>> + if (ret < 0) { >>> + dev_err(&phy->dev, "phy tuning failed --> %d\n", ret); >>> + goto out; >>> + } >>> + } >>> + >>> +out: >>> + mutex_unlock(&phy->mutex); >>> + >>> + return ret; >>> +} >>> +EXPORT_SYMBOL_GPL(phy_tune); >> >> I think "setup" instead of "tune" is much more clear and reusable. > > I think "setup" will look more like first time setting up the phy, > which is rather served by "init" callback. > This i thought would serve the purpose of over-riding certain PHY > parameters, which would not have been > possible at "init" time. > Please correct my thinking if i am unable to understand your point here. how about 'calibrate'? Thanks Kishon > >> >> Thanks, >> >> -- >> heikki >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > >