Re: [net-next PATCH v6 06/16] net: phy: phy_device: Call into the PHY driver to set LED brightness

From: Andrew Lunn
Date: Thu Apr 13 2023 - 10:44:02 EST


> Humm just thought of something else, is it OK for led_brightness_set and
> led_blink_set to call into functions that might require sleeping (MDIO, I2C,
> SPI, etc.)?

Hi Florian

That is fine. The LED class is similar to GPIOs. There is a can sleep
version, and an atomic version. For phylib we are using the can sleep
version. The LED core then hides the differences from the users.

Andrew