[PATCH net-next 2/5] net: phy: mediatek: Move LED helper functions into mtk phy lib
Andrew Lunn
andrew at lunn.ch
Thu Oct 31 08:03:25 PDT 2024
> I think I got your point. In a follow up patch, I'll do the following
> change:
>
> [Psuedo code]
> /* Currently */
> mtk_phy_led_hw_ctrl_get() {
> get_led_hw_settings(); //on & blink
>
> set/clear &priv->led_state according to led_hw_settings
>
> get *rules according to led_hw_settings
> }
>
> /* Change into */
> get_led_hw_settings()
>
> mtk_phy_leds_state_init() { /* Actual led_state init code */
> get_led_hw_settings(); //on & blink
>
> set/clear &priv->led_state according to led_hw_settings
> }
>
> mtk_phy_led_hw_ctrl_get() {
> get_led_hw_settings() in register; //on & blink
>
> get *rules according to led_hw_settings
> }
This looks about right. I will review the real patch when it is sent.
Andrew
More information about the linux-arm-kernel
mailing list