lkml.org 
[lkml]   [2023]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] net: phy: mediatek-ge-soc: support PHY LEDs
> 
> +#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

\
 
 \ /
  Last update: 2023-08-11 15:15    [W:0.818 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site