Messages in this thread | | | Date | Thu, 13 Apr 2023 16:43:29 +0200 | From | Andrew Lunn <> | Subject | Re: [net-next PATCH v6 06/16] net: phy: phy_device: Call into the PHY driver to set LED brightness |
| |
> 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
| |