Re: [net-next PATCH v6 5/5] net: phy: at803x: add LED support for qca808x

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

 



On Tue, Jan 02, 2024 at 07:38:34PM +0100, Christian Marangi wrote:
> +	if (active_low) {
> +		ret = phy_clear_bits_mmd(phydev, MDIO_MMD_AN,
> +					 QCA808X_MMD7_LED_POLARITY_CTRL,
> +					 QCA808X_LED_ACTIVE_HIGH);
> +	} else {
> +		ret = phy_set_bits_mmd(phydev, MDIO_MMD_AN,
> +				       QCA808X_MMD7_LED_POLARITY_CTRL,
> +				       QCA808X_LED_ACTIVE_HIGH);
> +	}

Maybe:

	return phy_modify_mmd(phydev, MDIO_MMD_AN,
			      QCA808X_MMD7_LED_POLARITY_CTRL,
			      active_low ? 0 : QCA808X_LED_ACTIVE_HIGH);

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!




[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