Re: [net-next PATCH v3 08/14] net: phy: marvell: Implement led_blink_set()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 14, 2023 at 11:15:10AM +0100, Christian Marangi wrote:
> +static int m88e1318_led_blink_set(struct phy_device *phydev, u32 index,
> +				  unsigned long *delay_on,
> +				  unsigned long *delay_off)
> +{
> +	u16 reg;

Same problem here.

> +
> +	reg = phy_read_paged(phydev, MII_MARVELL_LED_PAGE,
> +			     MII_88E1318S_PHY_LED_FUNC);
> +	if (reg < 0)
> +		return reg;
> +
> +	switch (index) {
> +	case 0:
> +	case 1:
> +	case 2:
> +		reg &= ~(0xf << (4 * index));
> +			reg |= MII_88E1318S_PHY_LED_FUNC_BLINK << (4 * index);
> +			/* Reset default is 84ms */
> +			*delay_on = 84 / 2;
> +			*delay_off = 84 / 2;
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +
> +	return phy_write_paged(phydev, MII_MARVELL_LED_PAGE,
> +			       MII_88E1318S_PHY_LED_FUNC, reg);
> +}



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux