[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO1PR11MB4771194F65E48759711A25F7E2BA2@CO1PR11MB4771.namprd11.prod.outlook.com>
Date: Fri, 9 Aug 2024 12:06:19 +0000
From: <Divya.Koppera@...rochip.com>
To: <andrew@...n.ch>
CC: <Arun.Ramadoss@...rochip.com>, <UNGLinuxDriver@...rochip.com>,
<hkallweit1@...il.com>, <linux@...linux.org.uk>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next] net: phy: microchip_t1: Adds support for LAN887x
phy
Hi Andrew,
Thanks for the review, please find my reply inline.
> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Thursday, August 8, 2024 7:42 PM
> To: Divya Koppera - I30481 <Divya.Koppera@...rochip.com>
> Cc: Arun Ramadoss - I17769 <Arun.Ramadoss@...rochip.com>;
> UNGLinuxDriver <UNGLinuxDriver@...rochip.com>; hkallweit1@...il.com;
> linux@...linux.org.uk; davem@...emloft.net; edumazet@...gle.com;
> kuba@...nel.org; pabeni@...hat.com; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Subject: Re: [PATCH net-next] net: phy: microchip_t1: Adds support for
> LAN887x phy
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> > + if (!IS_ENABLED(CONFIG_OF_MDIO)) {
> > + /* Configure default behavior of led to link and activity for any
> > + * speed
> > + */
> > + ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1,
> > + LAN887X_COMMON_LED3_LED2,
> > + LAN887X_COMMON_LED2_MODE_SEL_MASK,
> > + LAN887X_LED_LINK_ACT_ANY_SPEED);
>
> This is unusual. What has OF_MDIO got to do with LEDs?
>
As of now there is no device tree support for lan887x, in future if the support is added we have to implement
led framework for phy, that is why we are using this flag to configure leds on non device tree supported platforms.
> Since this is a new driver, you can default the LEDs to anything you want. You
> however cannot change the default once merged. Ideally you will follow up
> with some patches to add support for controlling the LEDs via /sys/class/leds.
>
Sure, we will make it default without flag in next series.
> > +static void lan887x_get_strings(struct phy_device *phydev, u8 *data)
> > +{
> > + for (int i = 0; i < ARRAY_SIZE(lan887x_hw_stats); i++) {
> > + strscpy(data + i * ETH_GSTRING_LEN,
> > + lan887x_hw_stats[i].string, ETH_GSTRING_LEN);
> > + }
>
> There has been a general trend of replacing code like this with ethtool_puts().
>
We will change in next series.
> Andrew
/Divya
Powered by blists - more mailing lists