mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	<linux-usb@vger.kernel.org>, <linux-samsung-soc@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH] phy: core: document calibrate() method
Date: Fri, 19 Jul 2019 17:55:30 +0530	[thread overview]
Message-ID: <6345ff36-9ee3-fe41-e416-a1178087b2c7@ti.com> (raw)
In-Reply-To: <1865da50-000f-e235-4090-1058d2aa217b@samsung.com>

Hi Marek,

On 19/07/19 5:51 PM, Marek Szyprowski wrote:
> Hi Kishon,
> 
> On 2019-07-19 12:04, Kishon Vijay Abraham I wrote:
>> Hi Marek,
>>
>> On 19/07/19 3:22 PM, Marek Szyprowski wrote:
>>> Commit 36914111e682 ("drivers: phy: add calibrate method") added support
>>> for generic phy_calibrate() method, but it didn't explain in detail when
>>> such method is supposed to be called. Add some more documentation directly
>>> to the phy.h to make it clean that it is intended to be called after every
>>> host controller reset.
>>>
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> ---
>>>   include/linux/phy/phy.h | 12 ++++++++++++
>>>   1 file changed, 12 insertions(+)
>>>
>>> diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
>>> index 15032f145063..46775e8b0ed9 100644
>>> --- a/include/linux/phy/phy.h
>>> +++ b/include/linux/phy/phy.h
>>> @@ -101,6 +101,18 @@ struct phy_ops {
>>>   	int	(*validate)(struct phy *phy, enum phy_mode mode, int submode,
>>>   			    union phy_configure_opts *opts);
>>>   	int	(*reset)(struct phy *phy);
>>> +
>>> +	/**
>>> +	 * @calibrate:
>>> +	 *
>>> +	 * Optional.
>>> +	 *
>>> +	 * Used to calibrate phy, typically by adjusting some parameters
>>> +	 * in runtime, which are otherwise lost after host controller
>>> +	 * reset and cannot be set in phy_init() and phy_power_on().
>>> +	 *
>>> +	 * Returns: 0 if successful, an negative error code otherwise
>>> +	 */
>>>   	int	(*calibrate)(struct phy *phy);
>> This should be added in drivers/phy/phy-core.c before phy_calibrate()?
> 
> Okay. Do you want to keep it also in phy.h (like for validate and 
> configure)?

No. Adding in phy.txt and before phy_calibrate() should suffice IMO.

Thanks
Kishon

  reply	other threads:[~2019-07-19 12:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190719095254eucas1p29c9e6c7aac20cf89b589fd2f2036c485@eucas1p2.samsung.com>
2019-07-19  9:52 ` Marek Szyprowski
2019-07-19 10:04   ` Kishon Vijay Abraham I
2019-07-19 12:21     ` Marek Szyprowski
2019-07-19 12:25       ` Kishon Vijay Abraham I [this message]
2019-07-22 16:50         ` Marek Szyprowski

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=6345ff36-9ee3-fe41-e416-a1178087b2c7@ti.com \
    --to=kishon@ti.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®