All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dimitri Fedrau <dima.fedrau@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: dimitri.fedrau@liebherr.com, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Andrew Davis <afd@ti.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v4 2/3] net: phy: Add helper for getting tx amplitude gain
Date: Wed, 12 Feb 2025 20:36:32 +0100	[thread overview]
Message-ID: <20250212193632.GC4383@debian> (raw)
In-Reply-To: <84b5b401-e48b-4328-84b2-f795c1404630@lunn.ch>

Am Wed, Feb 12, 2025 at 02:15:08PM +0100 schrieb Andrew Lunn:
> > @@ -3133,12 +3126,12 @@ static int phy_get_int_delay_property(struct device *dev, const char *name)
> >  s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
> >  			   const int *delay_values, int size, bool is_rx)
> >  {
> > -	s32 delay;
> > -	int i;
> > +	u32 delay;
> > +	int i, ret;
> 
> Networking uses reverse christmass tree. So you need to sort these two
> longest first.
>
Will fix it.

> > +int phy_get_tx_amplitude_gain(struct phy_device *phydev, struct device *dev,
> > +			      enum ethtool_link_mode_bit_indices linkmode,
> > +			      u32 *val)
> 
> Since this is an exported symbol, it would be nice to have some
> kerneldoc for it.
>
Yes.

> > +{
> > +	switch (linkmode) {
> > +	case ETHTOOL_LINK_MODE_100baseT_Full_BIT:
> > +		return phy_get_u32_property(dev,
> > +					    "tx-amplitude-100base-tx-percent",
> > +					    val);
> 
> So no handling of the default value here. This would be the logical
> place to have the 100 if the value is not in device tree.
> 
I will get rid of the default value.

> > +	default:
> > +		return -EINVAL;
> > +	}
> > +}
> > +EXPORT_SYMBOL(phy_get_tx_amplitude_gain);
> 
> I would prefer EXPORT_SYMBOL_GPL, but up to you.
>
Ok.

Best regards,
Dimitri Fedrau

  reply	other threads:[~2025-02-12 19:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11  8:33 [PATCH net-next v4 0/3] net: phy: dp83822: Add support for changing the transmit amplitude voltage Dimitri Fedrau
2025-02-11  8:33 ` Dimitri Fedrau via B4 Relay
2025-02-11  8:33 ` [PATCH net-next v4 1/3] dt-bindings: net: ethernet-phy: add property tx-amplitude-100base-tx-percent Dimitri Fedrau
2025-02-11  8:33   ` Dimitri Fedrau via B4 Relay
2025-02-11 16:57   ` Conor Dooley
2025-02-12 13:04   ` Andrew Lunn
2025-02-12 19:22     ` Dimitri Fedrau
2025-02-12 13:38   ` Russell King (Oracle)
2025-02-12 19:34     ` Dimitri Fedrau
2025-02-11  8:33 ` [PATCH net-next v4 2/3] net: phy: Add helper for getting tx amplitude gain Dimitri Fedrau
2025-02-11  8:33   ` Dimitri Fedrau via B4 Relay
2025-02-12 13:15   ` Andrew Lunn
2025-02-12 19:36     ` Dimitri Fedrau [this message]
2025-02-11  8:33 ` [PATCH net-next v4 3/3] net: phy: dp83822: Add support for changing the transmit amplitude voltage Dimitri Fedrau
2025-02-11  8:33   ` Dimitri Fedrau via B4 Relay
2025-02-12 13:18   ` Andrew Lunn

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=20250212193632.GC4383@debian \
    --to=dima.fedrau@gmail.com \
    --cc=afd@ti.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dimitri.fedrau@liebherr.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    /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.