• Linus Walleij's avatar
    leds: regulator: Make probeable from device tree · 835fc89e
    Linus Walleij authored
    The regulator LED can easily be adapted to probe from the
    device tree.
    
    We switch led_classdev_register() to led_classdev_register_ext()
    passing some struct led_init_data init_data that we leave NULL
    save the fwnode if platform data isn't present so that it will be
    populated from the device tree.
    
    If we have platform data we set up the name from the platform
    data but using init_data instead.
    
    Cc: Antonio Ospite <ao2@ao2.it>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
    835fc89e
leds-regulator.c 4.5 KB