[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1ed191f-7c70-4c34-ad1f-40aaae18582b@lunn.ch>
Date: Sat, 22 Jun 2024 19:29:45 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Sky Huang <SkyLake.Huang@...iatek.com>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Daniel Golle <daniel@...rotopia.org>,
Qingfang Deng <dqfext@...il.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
Steven Liu <Steven.Liu@...iatek.com>
Subject: Re: [PATCH net-next v8 06/13] net: phy: mediatek: Hook LED helper
functions in mtk-ge.c
> +static int mt753x_phy_led_blink_set(struct phy_device *phydev, u8 index,
> + unsigned long *delay_on,
> + unsigned long *delay_off)
> +{
> + struct mtk_gephy_priv *priv = phydev->priv;
> + bool blinking = false;
> + int err = 0;
> +
> + if (index > 1)
> + return -EINVAL;
> +
It looks like this test could be moved into the common code. It seems
like all variants have a single LED.
> + if (delay_on && delay_off && (*delay_on > 0) && (*delay_off > 0)) {
> + blinking = true;
> + *delay_on = 50;
> + *delay_off = 50;
> + }
Do the different hardware variants have different blink speeds? If
not, maybe also move this into the common code. Otherwise maybe add a
comment in the commit message explaining the differences between the
hardware variants.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists