From: Andrew Lunn <andrew@lunn.ch>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Qingfang Deng <dqfext@gmail.com>,
SkyLake Huang <SkyLake.Huang@mediatek.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net-next] net: phy: mediatek-ge-soc: support PHY LEDs
Date: Fri, 11 Aug 2023 15:13:38 +0200 [thread overview]
Message-ID: <9727375d-8d89-489b-bd3f-4f18930ff42c@lunn.ch> (raw)
In-Reply-To: <a21288bf80f26dda6c9729edb5b25d0995df5e38.1691724757.git.daniel@makrotopia.org>
>
> +#define MTK_PHY_LED_STATE_FORCE_ON BIT(0)
> +#define MTK_PHY_LED_STATE_FORCE_BLINK BIT(1)
> +#define MTK_PHY_LED_STATE_NETDEV BIT(2)
> +struct mtk_socphy_priv {
> + unsigned long led_state;
> +};
Hi Daniel
A blank line between the #defines and the struct would be nice.
> +
> +struct mtk_socphy_shared {
> + u32 boottrap;
> + struct mtk_socphy_priv priv[4];
> +};
> +
> static int mtk_socphy_read_page(struct phy_device *phydev)
> {
> return __phy_read(phydev, MTK_EXT_PAGE_ACCESS);
> @@ -1071,6 +1112,370 @@ static int mt798x_phy_config_init(struct phy_device *phydev)
> return mt798x_phy_calibration(phydev);
> }
>
> +static int mt798x_phy_hw_led_on_set(struct phy_device *phydev, u8 index,
> + bool on)
> +{
> + struct mtk_socphy_priv *priv = phydev->priv;
> + u32 mask = MTK_PHY_LED_STATE_FORCE_ON << (index ? 16 : 0);
> + bool changed;
Reverse christmass tree please.
Otherwise, this looks good.
Andrew
next prev parent reply other threads:[~2023-08-11 13:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 3:35 [PATCH net-next] net: phy: mediatek-ge-soc: support PHY LEDs Daniel Golle
2023-08-11 12:14 ` Simon Horman
2023-08-11 13:13 ` Andrew Lunn [this message]
2023-08-11 16:30 ` Vadim Fedorenko
2023-08-11 16:39 ` Andrew Lunn
2023-08-11 16:44 ` Vadim Fedorenko
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=9727375d-8d89-489b-bd3f-4f18930ff42c@lunn.ch \
--to=andrew@lunn.ch \
--cc=SkyLake.Huang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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