linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Yuti Amonkar <yamonkar@cadence.com>
Cc: linux-kernel@vger.kernel.org, kishon@ti.com,
	mark.rutland@arm.com, jsarha@ti.com, tomi.valkeinen@ti.com,
	praneeth@ti.com, mparab@cadence.com, sjakhade@cadence.com
Subject: Re: [PATCH v1 2/2] phy: phy-cadence-torrent: Use PHY kernel APIs to set PHY attributes
Date: Wed, 29 Apr 2020 14:27:50 +0200	[thread overview]
Message-ID: <20200429122750.hup7vbmz3xnpfwa5@gilmour.lan> (raw)
In-Reply-To: <1588057804-29161-3-git-send-email-yamonkar@cadence.com>

[-- Attachment #1: Type: text/plain, Size: 1693 bytes --]

Hi,

On Tue, Apr 28, 2020 at 09:10:04AM +0200, Yuti Amonkar wrote:
> From: Swapnil Jakhade <sjakhade@cadence.com>
> 
> Use generic PHY framework function phy_set_bus_width() to set number
> of lanes and function phy_set_max_link_rate() to set maximum link rate
> supported by PHY.
> 
> Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>

This should have your SoB.

> ---
>  drivers/phy/cadence/phy-cadence-torrent.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
> index 7116127358ee..b914e5ddf93c 100644
> --- a/drivers/phy/cadence/phy-cadence-torrent.c
> +++ b/drivers/phy/cadence/phy-cadence-torrent.c
> @@ -1852,6 +1852,9 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
>  				 cdns_phy->phys[node].num_lanes,
>  				 cdns_phy->max_bit_rate / 1000,
>  				 cdns_phy->max_bit_rate % 1000);
> +
> +			phy_set_bus_width(gphy, cdns_phy->phys[node].num_lanes);
> +			phy_set_max_link_rate(gphy, cdns_phy->max_bit_rate);

I think what Kishon meant in his previous mail is that it's not really clear (to
me at least) how that function would be useful.

In this particular case, what would the consumer make of that information? Does
the phy needs to be reconfigured based on the max rate being changed?

Some phy_configure_opts structures also have a somewhat similar field that can
be negociated between the provider and the consumer using phy_validate, wouldn't
that be redundant?

Most of that discussion can only happen when you've provided a use-case for that
series, so a consumer using it would help greatly there.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2020-04-29 12:27 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 [this message]
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

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=20200429122750.hup7vbmz3xnpfwa5@gilmour.lan \
    --to=maxime@cerno.tech \
    --cc=jsarha@ti.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mparab@cadence.com \
    --cc=praneeth@ti.com \
    --cc=sjakhade@cadence.com \
    --cc=tomi.valkeinen@ti.com \
    --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;
as well as URLs for NNTP newsgroup(s).