[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <978c8c91-5c52-4e22-bdb8-5731a35278b1@oracle.com>
Date: Wed, 21 May 2025 18:45:07 +0530
From: ALOK TIWARI <alok.a.tiwari@...cle.com>
To: stefano.radaelli21@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>, 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>, Xu Liang <lxu@...linear.com>
Subject: Re: [PATCH net-next v5] net: phy: add driver for MaxLinear MxL86110
PHY
On 21-05-2025 17:04, stefano.radaelli21@...il.com wrote:
> +/**
> + * mxl86110_enable_led_activity_blink - Enable LEDs activity blink on PHY
> + * @phydev: Pointer to the PHY device structure
> + *
> + * Configure all PHY LEDs to blink on traffic activity regardless of their
> + * ON or OFF state. This behavior allows each LED to serve as a pure activity
> + * indicator, independently of its use as a link status indicator.
> + *
"regardless of whether they are ON or OFF"
> + * By default, each LED blinks only when it is also in the ON state.
> + * This function modifies the appropriate registers (LABx fields)
> + * to enable blinking even when the LEDs are OFF, to allow the LED to be used
> + * as a traffic indicator without requiring it to also serve
> + * as a link status LED.
> + *
> + * Note: Any further LED customization can be performed via the
> + * /sys/class/led interface; the functions led_hw_is_supported,
/sys/class/led -> /sys/class/leds (it is leds in sysfs)
> + * led_hw_control_get, and led_hw_control_set are used
> + * to support this mechanism.
> + *
> + * This function assumes the caller already holds the MDIO bus lock
> + * or otherwise has exclusive access to the PHY.
> + *
> + * Return: 0 on success or a negative errno code on failure.
> + */
> +static int mxl86110_enable_led_activity_blink(struct phy_device *phydev)
> +{
> + int i, ret = 0;
> +
> + for (i = 0; i < MXL86110_MAX_LEDS; i++) {
> + ret = __mxl86110_modify_extended_reg(phydev,
> + MXL86110_LED0_CFG_REG + i,
> + 0,
> + MXL86110_LEDX_CFG_BLINK);
> + if (ret < 0)
> + break;
> + }
> +
> + return ret;
> +};
remove ;
Thanks,
Alok
Powered by blists - more mailing lists