]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
led: Drop led_default_state()
authorMarek Vasut <marex@denx.de>
Fri, 22 Apr 2022 13:41:42 +0000 (15:41 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 28 Apr 2022 13:26:44 +0000 (09:26 -0400)
This function is empty, drop it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Steven Lawrance <steven.lawrance@softathome.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
19 files changed:
board/aristainetos/aristainetos.c
board/bosch/guardian/board.c
board/dhelectronics/dh_stm32mp1/board.c
board/gardena/smart-gateway-at91sam/board.c
board/gardena/smart-gateway-mt7688/board.c
board/gateworks/venice/venice.c
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
board/mscc/jr2/jr2.c
board/mscc/luton/luton.c
board/mscc/ocelot/ocelot.c
board/mscc/serval/serval.c
board/mscc/servalt/servalt.c
board/phytec/pcm052/pcm052.c
board/sandbox/sandbox.c
board/siemens/capricorn/board.c
board/st/stm32mp1/stm32mp1.c
drivers/led/led-uclass.c
include/led.h
test/dm/led.c

index 19af59606da5a53b9d8d662265e656a7b34fb5dd..514cb60d5ba0349e31f66f4807d12674650ac1a1 100644 (file)
@@ -418,7 +418,6 @@ int board_late_init(void)
        int x, y;
        int ret;
 
-       led_default_state();
        splash_get_pos(&x, &y);
        bmp_display((ulong)&bmp_logo_bitmap[0], x, y);
 
index 105b75e65e9eb01fe74515e1f26e5a606dc8f3ee..68f2744610b3ab3669f431b3f207c4690ec0f584 100644 (file)
@@ -327,9 +327,6 @@ int board_late_init(void)
        int ret;
        struct udevice *cdev;
 
-#ifdef CONFIG_LED_GPIO
-       led_default_state();
-#endif
        set_bootmode_env();
 
        ret = uclass_get_device(UCLASS_PANEL, 0, &cdev);
index f44afb01e27ff138f621a90b2ec5a1cadef5c043..67273f9099228abbea3052d6250839d33cac1a3e 100644 (file)
@@ -607,9 +607,6 @@ int board_init(void)
 
        board_init_fmc2();
 
-       if (CONFIG_IS_ENABLED(LED))
-               led_default_state();
-
        return 0;
 }
 
index 3f402cfeee8c1a3a0e06c98418bb96d9b140780b..c6eb11e93263f977370512c39fe9279d42ecfc03 100644 (file)
@@ -24,9 +24,6 @@ int board_late_init(void)
 {
        at91_prepare_cpu_var();
 
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        return 0;
 }
 
index 8a3a6e3482564b7b1722cf5e81f2c54f19283e7b..aa833a030fd96095eba2eabb58b7161c4346330f 100644 (file)
@@ -183,9 +183,6 @@ err_free:
 
 int board_late_init(void)
 {
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        factory_data_env_config();
 
        return 0;
index 4290a69807719003550a39c1a6e596de25a58572..f1efabb203d7e8a876a5dfda69b71797edba22a5 100644 (file)
@@ -128,8 +128,6 @@ int board_late_init(void)
        u8 enetaddr[6];
        char fdt[64];
 
-       led_default_state();
-
        /* Set board serial/model */
        if (!env_get("serial#"))
                env_set_ulong("serial#", eeprom_get_serial());
index 110496d99505ef4f0bd046d59ae8250634193bb8..e6877e4c07039dc3bf04b780a5b8a5e3673a7f36 100644 (file)
@@ -137,9 +137,6 @@ int board_late_init(void)
        add_board_boot_modes(board_boot_modes);
 #endif
 
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        env_set("boardname", "kp-tpc");
        env_set("boardsoc", "imx6q");
        return 0;
index 1c516aacd8814c7f9a00e9175548dd7d9bf500ef..6abf08bd24cc22a53e0a7ad6fd6858771a5b3006 100644 (file)
@@ -30,10 +30,6 @@ int board_early_init_r(void)
        /* Address of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE;
 
-       /* LED setup */
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        return 0;
 }
 
index 038902d08a9da6dc1d82a343b376b8dec580ab1d..76e3f2ebbce7e2c3129ec5cf62880d1420b92bfe 100644 (file)
@@ -31,10 +31,6 @@ int board_early_init_r(void)
        /* Address of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE;
 
-       /* LED setup */
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        return 0;
 }
 
index c462890bb8538f4e1c1318f06b8350326e39b681..2a75ec281cb149210a62118fa406ff8cb01c9d99 100644 (file)
@@ -79,10 +79,6 @@ int board_early_init_r(void)
        /* Address of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE;
 
-       /* LED setup */
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        return 0;
 }
 
index 94c1c42b79b2c6199573ef03db8b73cd4da6a2e4..87e79076574fabea572eadbbfd4305ef6b4e4f45 100644 (file)
@@ -24,10 +24,6 @@ int board_early_init_r(void)
        /* Address of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE;
 
-       /* LED setup */
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        return 0;
 }
 
index 252d8e3156d55a4e80523b4ef56b93ce7d3923a2..bd8c7e8b70036f47467e16b31873fbab5a9cafba 100644 (file)
@@ -24,10 +24,6 @@ int board_early_init_r(void)
        /* Address of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE;
 
-       /* LED setup */
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        return 0;
 }
 
index f9cf4abd474be2b948bef8f3640909c0f4cd1e42..0f7235979b0428e5485898a62be11cf2bec0e5d2 100644 (file)
@@ -360,9 +360,6 @@ int board_late_init(void)
        struct src *psrc = (struct src *)SRC_BASE_ADDR;
        u32 reg;
 
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        /*
         * BK4r1 handle emergency/service SD card boot
         * Checking the SBMR1 register BOOTCFG1 byte:
index 28ad6efd1368a03d2190dde561d9e8c195021f23..e054f300c4a5dadf7064ebf3ced81f7a3ddfaad8 100644 (file)
@@ -107,9 +107,6 @@ int dram_init(void)
 
 int board_init(void)
 {
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        return 0;
 }
 
index dcbab8e4d21ed80ed807a7b377be1aa0bfd90bcb..4a02d64aec3cc283d3278cce006621bc27c55706 100644 (file)
@@ -244,10 +244,6 @@ static int board_led_init(void)
        u8 pca_led[2] = { 0x00, 0x00 };
        int ret;
 
-       /* init all GPIO LED's */
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        /* enable all leds on PCA9552 */
        ret = uclass_get_device_by_seq(UCLASS_I2C, PCA9552_1_I2C_BUS, &bus);
        if (ret) {
index fff1880e5b03b850da4415ef27c6a154679dd243..7466e1c732afec9dd895fe6231ce426d95f61c02 100644 (file)
@@ -666,9 +666,6 @@ int board_init(void)
        if (IS_ENABLED(CONFIG_ARMV7_NONSEC))
                sysconf_init();
 
-       if (CONFIG_IS_ENABLED(LED))
-               led_default_state();
-
        setup_led(LEDST_ON);
 
        return 0;
index 2ce72933b6c511643183d9ae8fcc06d5ac63a13e..68ca3c29702bbd3818e5a32917f257ad7fd467bc 100644 (file)
@@ -66,12 +66,6 @@ int led_set_period(struct udevice *dev, int period_ms)
 }
 #endif
 
-/* This is superseded by led_post_bind()/led_post_probe() below. */
-int led_default_state(void)
-{
-       return 0;
-}
-
 static int led_post_bind(struct udevice *dev)
 {
        struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev);
index 43acca85719bc2359175c75667f57cfea10831ba..329041008c1adb13e862635f428fcbb9cc18a3bd 100644 (file)
@@ -110,13 +110,4 @@ enum led_state_t led_get_state(struct udevice *dev);
  */
 int led_set_period(struct udevice *dev, int period_ms);
 
-/**
- * led_default_state() - set the default state for all the LED
- *
- * This enables all leds which have default state.
- * see Documentation/devicetree/bindings/leds/common.txt
- *
- */
-int led_default_state(void);
-
 #endif
index ac6ee363940beded9a8d8bef762c9cbd6bd593b7..5bbe04648a1ca6bae455c5c27a9ad2a64ac99607 100644 (file)
@@ -33,9 +33,6 @@ static int dm_test_led_default_state(struct unit_test_state *uts)
 {
        struct udevice *dev;
 
-       /* configure the default state (auto-probe) */
-       led_default_state();
-
        /* Check that we handle the default-state property correctly. */
        ut_assertok(led_get_by_label("sandbox:default_on", &dev));
        ut_asserteq(LEDST_ON, led_get_state(dev));