All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Gautam <gautam.vivek@samsung.com>
To: Pratyush Anand <pratyush.anand@st.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-samsung-soc@vger.kernel.org" 
	<linux-samsung-soc@vger.kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"kishon@ti.com" <kishon@ti.com>,
	"mathias.nyman@intel.com" <mathias.nyman@intel.com>,
	"jwerner@chromium.org" <jwerner@chromium.org>,
	"kgene.kim@samsung.com" <kgene.kim@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/4] phy: Add provision for calibrating phy.
Date: Wed, 9 Jul 2014 14:32:35 +0530	[thread overview]
Message-ID: <CAFp+6iH697pP9UWhYLKJc_S2VZUJQ3y6GDzg78gat=X1kybtiQ@mail.gmail.com> (raw)
In-Reply-To: <20140609034902.GA2625@pratyush-vbox>

Hi,


On Mon, Jun 9, 2014 at 9:19 AM, Pratyush Anand <pratyush.anand@st.com> wrote:
> On Fri, Jun 06, 2014 at 08:12:12PM +0800, Vivek Gautam wrote:
>> Some PHY controllers may need to calibrate certain
>> PHY settings after initialization of the controller and
>> sometimes even after initializing the PHY-consumer too.
>> Add support for the same in order to let consumers do so in need.
>>
>> Signed-off-by: vivek Gautam <gautam.vivek@samsung.com>
>> ---
>>  drivers/phy/phy-core.c  |   36 ++++++++++++++++++++++++++++++++++++
>>  include/linux/phy/phy.h |    7 +++++++
>>  2 files changed, 43 insertions(+)
>>
>> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
>> index 74d4346..92d31a3 100644
>> --- a/drivers/phy/phy-core.c
>> +++ b/drivers/phy/phy-core.c
>> @@ -376,6 +376,42 @@ int phy_power_off(struct phy *phy)
>>  EXPORT_SYMBOL_GPL(phy_power_off);
>>
>>  /**
>> + * phy_calibrate - calibrate a phy post initialization
>> + * @phy: Pointer to 'phy' from consumer
>> + *
>> + * For certain PHYs, it may be needed to calibrate few phy parameters
>> + * post initialization. The need to calibrate may arise after the
>
> For USB you may need to calibrate phy after each new connection. If
> so, why not to use already existing struct usb_phy's notify_connect.

The phy_calibrate will rather be a one time phenomenon.
On exynos atleast the case is : the phy settings for PIPE3 phy on DWC3
controller need to be
configured post hcd reset. so that we don't need to re-configure these
phy settings on every connect.

Moreover *there are certain devices* which need these PHY settings
even to show a connect-status-change.
So, it would rather be not useful to create a 'phy_notify_connect' API
in drivers/phy/ and use the same for this purpose.



-- 
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India

WARNING: multiple messages have this Message-ID (diff)
From: gautam.vivek@samsung.com (Vivek Gautam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] phy: Add provision for calibrating phy.
Date: Wed, 9 Jul 2014 14:32:35 +0530	[thread overview]
Message-ID: <CAFp+6iH697pP9UWhYLKJc_S2VZUJQ3y6GDzg78gat=X1kybtiQ@mail.gmail.com> (raw)
In-Reply-To: <20140609034902.GA2625@pratyush-vbox>

Hi,


On Mon, Jun 9, 2014 at 9:19 AM, Pratyush Anand <pratyush.anand@st.com> wrote:
> On Fri, Jun 06, 2014 at 08:12:12PM +0800, Vivek Gautam wrote:
>> Some PHY controllers may need to calibrate certain
>> PHY settings after initialization of the controller and
>> sometimes even after initializing the PHY-consumer too.
>> Add support for the same in order to let consumers do so in need.
>>
>> Signed-off-by: vivek Gautam <gautam.vivek@samsung.com>
>> ---
>>  drivers/phy/phy-core.c  |   36 ++++++++++++++++++++++++++++++++++++
>>  include/linux/phy/phy.h |    7 +++++++
>>  2 files changed, 43 insertions(+)
>>
>> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
>> index 74d4346..92d31a3 100644
>> --- a/drivers/phy/phy-core.c
>> +++ b/drivers/phy/phy-core.c
>> @@ -376,6 +376,42 @@ int phy_power_off(struct phy *phy)
>>  EXPORT_SYMBOL_GPL(phy_power_off);
>>
>>  /**
>> + * phy_calibrate - calibrate a phy post initialization
>> + * @phy: Pointer to 'phy' from consumer
>> + *
>> + * For certain PHYs, it may be needed to calibrate few phy parameters
>> + * post initialization. The need to calibrate may arise after the
>
> For USB you may need to calibrate phy after each new connection. If
> so, why not to use already existing struct usb_phy's notify_connect.

The phy_calibrate will rather be a one time phenomenon.
On exynos atleast the case is : the phy settings for PIPE3 phy on DWC3
controller need to be
configured post hcd reset. so that we don't need to re-configure these
phy settings on every connect.

Moreover *there are certain devices* which need these PHY settings
even to show a connect-status-change.
So, it would rather be not useful to create a 'phy_notify_connect' API
in drivers/phy/ and use the same for this purpose.



-- 
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India

  reply	other threads:[~2014-07-09  9:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 12:12 [PATCH v1 0/4] Fine tune USB 3.0 PHY on exynos5420 Vivek Gautam
2014-06-06 12:12 ` Vivek Gautam
2014-06-06 12:12 ` Vivek Gautam
2014-06-06 12:12 ` [PATCH 1/4] phy: Add provision for calibrating phy Vivek Gautam
2014-06-06 12:12   ` Vivek Gautam
2014-06-09  3:49   ` Pratyush Anand
2014-06-09  3:49     ` Pratyush Anand
2014-06-09  3:49     ` Pratyush Anand
2014-07-09  9:02     ` Vivek Gautam [this message]
2014-07-09  9:02       ` Vivek Gautam
2014-07-09  9:02       ` Vivek Gautam
2014-06-06 12:12 ` [PATCH 2/4] usb: host: xhci-plat: Add support to get PHYs Vivek Gautam
2014-06-06 12:12   ` Vivek Gautam
2014-06-09 20:22   ` Julius Werner
2014-06-09 20:22     ` Julius Werner
2014-06-09 20:22     ` Julius Werner
2014-06-24  6:10     ` Vivek Gautam
2014-06-24  6:10       ` Vivek Gautam
2014-06-24  6:10       ` Vivek Gautam
2014-06-24 22:34     ` Sergei Shtylyov
2014-06-24 22:34       ` Sergei Shtylyov
2014-06-24 22:34       ` Sergei Shtylyov
2014-06-25  5:49       ` Vivek Gautam
2014-06-25  5:49         ` Vivek Gautam
2014-06-25  5:49         ` Vivek Gautam
2014-06-25  8:44       ` Vivek Gautam
2014-06-25  8:44         ` Vivek Gautam
2014-06-25  8:44         ` Vivek Gautam
2014-07-03 22:39         ` Sergei Shtylyov
2014-07-03 22:39           ` Sergei Shtylyov
2014-07-03 22:39           ` Sergei Shtylyov
2014-06-06 12:12 ` [PATCH 3/4] usb: host: xhci-plat: Caibrate PHY post host reset Vivek Gautam
2014-06-06 12:12   ` Vivek Gautam
2014-06-06 12:12 ` [PATCH 4/4] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800 Vivek Gautam
2014-06-06 12:12   ` Vivek Gautam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFp+6iH697pP9UWhYLKJc_S2VZUJQ3y6GDzg78gat=X1kybtiQ@mail.gmail.com' \
    --to=gautam.vivek@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jwerner@chromium.org \
    --cc=kgene.kim@samsung.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=pratyush.anand@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.