mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Swapnil Kashinath Jakhade <sjakhade@cadence.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Maxime Ripard <maxime@cerno.tech>
Cc: Yuti Suresh Amonkar <yamonkar@cadence.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"jsarha@ti.com" <jsarha@ti.com>,
	"praneeth@ti.com" <praneeth@ti.com>,
	Milind Parab <mparab@cadence.com>, Vinod Koul <vkoul@kernel.org>
Subject: Re: [PATCH v1 2/2] phy: phy-cadence-torrent: Use PHY kernel APIs to set PHY attributes
Date: Mon, 18 May 2020 17:41:00 +0530	[thread overview]
Message-ID: <39d5238c-0344-14ef-9e35-8ce4348ce9e4@ti.com> (raw)
In-Reply-To: <BY5PR07MB6982568DE9F5A4BF00433CA6C5B80@BY5PR07MB6982.namprd07.prod.outlook.com>

Hi,

On 5/18/2020 12:24 PM, Swapnil Kashinath Jakhade wrote:
> Hi Kishon,
> 
>> -----Original Message-----
>> From: Kishon Vijay Abraham I <kishon@ti.com>
>> Sent: Wednesday, May 13, 2020 8:08 AM
>> To: Tomi Valkeinen <tomi.valkeinen@ti.com>; Maxime Ripard
>> <maxime@cerno.tech>; Swapnil Kashinath Jakhade
>> <sjakhade@cadence.com>
>> Cc: Yuti Suresh Amonkar <yamonkar@cadence.com>; linux-
>> kernel@vger.kernel.org; mark.rutland@arm.com; jsarha@ti.com;
>> praneeth@ti.com; Milind Parab <mparab@cadence.com>; Vinod Koul
>> <vkoul@kernel.org>
>> Subject: Re: [PATCH v1 2/2] phy: phy-cadence-torrent: Use PHY kernel APIs to
>> set PHY attributes
>>
>> EXTERNAL MAIL
>>
>>
>> Hi,
>>
>> On 5/8/2020 1:20 PM, Tomi Valkeinen wrote:
>>> On 07/05/2020 20:17, Maxime Ripard wrote:
>>>
>>>>> Actually, for this particular case, consumer driver will be the
>>>>> Cadence MHDP bridge driver for DisplayPort which is also under
>>>>> review process for upstreaming [1]. So this DRM bridge driver will
>>>>> make use of the PHY APIs
>>>>> phy_get_bus_width() and phy_get_max_link_rate() during execution of
>>>>> probe function to get the number of lanes and maximum link rate
>>>>> supported by Cadence Torrent PHY. This information is required to
>>>>> set the host capabilities in the DRM bridge driver, based on which
>>>>> initial values for DisplayPort link training will be determined.
>>>>>
>>>>> The changes in this PHY patch series are based on suggestions in the
>>>>> review comments in [1] which asks to use kernel PHY APIs to read
>>>>> these properties instead of directly accessing PHY device node. The
>>>>> complete driver and actual use of these APIs can be found in [2].
>>>>> This is how we are planning to use these APIs.
>>>>
>>>> I haven't really looked into the displayport spec, but I'd assume
>>>> that there's a lot more parameters that would need to be negociated
>>>> between the phy and the DP block? If so, then it would make more
>>>> sense to follow the path we did for MIPI-DSI where the parameters can
>>>> be negociated through the phy_configure / phy_validate interface.
>>>
>>> I don't think this is negotiation, but just exposing the (max)
>>> capabilities of PHY, inside which the configure can work. Maybe all
>>> the capabilities could handled with a struct (struct phy_attrs),
>>> instead of adding separate functions for each, though.
>>
>> yeah, that makes sense. Just that users should take care not to over-write all
>> the phy attributes with partial information.
> 
> It would be really helpful if you could clarify a bit regarding how to handle this
> exactly. What I could understand from Tomi' suggestion is that all PHY attributes
> in struct phy_attrs should have single pair of functions to get and set all the PHY
> attributes (e.g. phy_get_attrs / phy_set_attrs), instead of separate get/set pair of
> functions for individual attribute (bus_width, mode, max_link_rate etc). Is this
> understanding correct? If so, how should the existing functions for bus_width and
> mode be used?

Yes, your understanding is correct. There are already existing users of
bus_width, mode, so let's not disturb that. That could maybe deprecated later.

Thanks
Kishon

      reply	other threads:[~2020-05-18 12:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  7:10 [PATCH v1 0/2] Add support to get/set PHY attributes using Yuti Amonkar
2020-04-28  7:10 ` [PATCH v1 1/2] phy: Add max_link_rate as a PHY attribute along with APIs to get/set its value Yuti Amonkar
2020-04-28  7:10 ` [PATCH v1 2/2] phy: phy-cadence-torrent: Use PHY kernel APIs to set PHY attributes Yuti Amonkar
2020-04-29 12:27   ` Maxime Ripard
2020-04-30 14:06     ` Swapnil Kashinath Jakhade
2020-05-07 17:17       ` Maxime Ripard
2020-05-08  7:50         ` Tomi Valkeinen
2020-05-13  2:37           ` Kishon Vijay Abraham I
2020-05-18  6:54             ` Swapnil Kashinath Jakhade
2020-05-18 12:11               ` Kishon Vijay Abraham I [this message]

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=39d5238c-0344-14ef-9e35-8ce4348ce9e4@ti.com \
    --to=kishon@ti.com \
    --cc=jsarha@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime@cerno.tech \
    --cc=mparab@cadence.com \
    --cc=praneeth@ti.com \
    --cc=sjakhade@cadence.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=vkoul@kernel.org \
    --cc=yamonkar@cadence.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®