From 0fbe15030357a9dca7d6d3d9de4facea5a7b4bcc Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 4 Aug 2024 02:07:02 +0100 Subject: [PATCH] Remove unnecessary RGB Matrix shutdown hooks (#24238) --- .../geekboards/macropad_v2/macropad_v2.c | 9 ------ keyboards/geekboards/tester/keyboard.json | 3 +- keyboards/geekboards/tester/tester.c | 10 ------ keyboards/handwired/colorlice/colorlice.c | 14 --------- keyboards/handwired/p65rgb/p65rgb.c | 31 ------------------- keyboards/kbdfans/kbdmini/kbdmini.c | 10 ------ keyboards/kprepublic/bm40hsrgb/rev1/rev1.c | 10 ------ .../latincompass/latin60rgb/latin60rgb.c | 10 ------ keyboards/melgeek/mj61/rev1/rev1.c | 9 ------ keyboards/melgeek/mj61/rev2/rev2.c | 9 ------ keyboards/melgeek/mj63/rev1/rev1.c | 9 ------ keyboards/melgeek/mj63/rev2/rev2.c | 9 ------ keyboards/melgeek/mj64/rev1/rev1.c | 9 ------ keyboards/melgeek/mj64/rev2/rev2.c | 9 ------ keyboards/melgeek/mj64/rev3/rev3.c | 9 ------ keyboards/melgeek/mj65/rev3/rev3.c | 10 ------ keyboards/melgeek/mojo75/rev1/rev1.c | 10 ------ keyboards/percent/canoe_gen2/canoe_gen2.c | 9 ------ .../phase_studio/titan65/hotswap/hotswap.c | 9 ------ .../titan65/hotswap/keyboard.json | 3 +- keyboards/planck/light/keyboard.json | 3 +- keyboards/planck/light/light.c | 12 ------- keyboards/sowbug/68keys/68keys.c | 9 ------ keyboards/sowbug/68keys/keyboard.json | 3 +- keyboards/sowbug/ansi_tkl/ansi_tkl.c | 9 ------ keyboards/sowbug/ansi_tkl/keyboard.json | 3 +- 26 files changed, 10 insertions(+), 230 deletions(-) delete mode 100644 keyboards/handwired/p65rgb/p65rgb.c diff --git a/keyboards/geekboards/macropad_v2/macropad_v2.c b/keyboards/geekboards/macropad_v2/macropad_v2.c index 191290d3fae..ba65697988f 100644 --- a/keyboards/geekboards/macropad_v2/macropad_v2.c +++ b/keyboards/geekboards/macropad_v2/macropad_v2.c @@ -53,13 +53,4 @@ led_config_t g_led_config = { { 2, 2, 2 } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/geekboards/tester/keyboard.json b/keyboards/geekboards/tester/keyboard.json index 60c6b34e002..743e5e2392d 100644 --- a/keyboards/geekboards/tester/keyboard.json +++ b/keyboards/geekboards/tester/keyboard.json @@ -50,7 +50,8 @@ "solid_reactive_nexus": true, "solid_reactive_multinexus": true }, - "driver": "is31fl3731" + "driver": "is31fl3731", + "sleep": true }, "features": { "bootmagic": true, diff --git a/keyboards/geekboards/tester/tester.c b/keyboards/geekboards/tester/tester.c index 11d2eb4db29..4daa4ef0625 100644 --- a/keyboards/geekboards/tester/tester.c +++ b/keyboards/geekboards/tester/tester.c @@ -29,13 +29,3 @@ led_config_t g_led_config = { 4, 4, 4, 4, 4, 4, 4, 4 } }; - -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} diff --git a/keyboards/handwired/colorlice/colorlice.c b/keyboards/handwired/colorlice/colorlice.c index 92914b79bc6..81e87d8c7a9 100644 --- a/keyboards/handwired/colorlice/colorlice.c +++ b/keyboards/handwired/colorlice/colorlice.c @@ -37,17 +37,3 @@ led_config_t g_led_config = { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; #endif - -#ifdef RGB_MATRIX_ENABLE -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} -#endif diff --git a/keyboards/handwired/p65rgb/p65rgb.c b/keyboards/handwired/p65rgb/p65rgb.c deleted file mode 100644 index 3d7185f9d18..00000000000 --- a/keyboards/handwired/p65rgb/p65rgb.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 marhalloweenvt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} -#endif diff --git a/keyboards/kbdfans/kbdmini/kbdmini.c b/keyboards/kbdfans/kbdmini/kbdmini.c index 7aec00cbdc2..18acc21da4f 100644 --- a/keyboards/kbdfans/kbdmini/kbdmini.c +++ b/keyboards/kbdfans/kbdmini/kbdmini.c @@ -76,13 +76,3 @@ led_config_t g_led_config = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; - -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} diff --git a/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c b/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c index 16e515042de..f6df97ebf1f 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c +++ b/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c @@ -40,14 +40,4 @@ led_config_t g_led_config = { } }; - -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/latincompass/latin60rgb/latin60rgb.c b/keyboards/latincompass/latin60rgb/latin60rgb.c index 305aaff5f21..78052eccb6a 100644 --- a/keyboards/latincompass/latin60rgb/latin60rgb.c +++ b/keyboards/latincompass/latin60rgb/latin60rgb.c @@ -83,16 +83,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW11_CS13, SW10_CS13, SW12_CS13 } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/melgeek/mj61/rev1/rev1.c b/keyboards/melgeek/mj61/rev1/rev1.c index 3ee0da5183b..8e0be621275 100644 --- a/keyboards/melgeek/mj61/rev1/rev1.c +++ b/keyboards/melgeek/mj61/rev1/rev1.c @@ -106,13 +106,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/melgeek/mj61/rev2/rev2.c b/keyboards/melgeek/mj61/rev2/rev2.c index 71d41c16b3f..7b27fa44c35 100644 --- a/keyboards/melgeek/mj61/rev2/rev2.c +++ b/keyboards/melgeek/mj61/rev2/rev2.c @@ -116,13 +116,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/melgeek/mj63/rev1/rev1.c b/keyboards/melgeek/mj63/rev1/rev1.c index e3baf32de7c..d6caeac0c17 100644 --- a/keyboards/melgeek/mj63/rev1/rev1.c +++ b/keyboards/melgeek/mj63/rev1/rev1.c @@ -110,13 +110,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/melgeek/mj63/rev2/rev2.c b/keyboards/melgeek/mj63/rev2/rev2.c index 418092ec9f6..95f0b28f5d3 100644 --- a/keyboards/melgeek/mj63/rev2/rev2.c +++ b/keyboards/melgeek/mj63/rev2/rev2.c @@ -116,13 +116,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/melgeek/mj64/rev1/rev1.c b/keyboards/melgeek/mj64/rev1/rev1.c index b9609cad1e8..ea3376a8c7c 100644 --- a/keyboards/melgeek/mj64/rev1/rev1.c +++ b/keyboards/melgeek/mj64/rev1/rev1.c @@ -107,13 +107,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/melgeek/mj64/rev2/rev2.c b/keyboards/melgeek/mj64/rev2/rev2.c index 16c8e1f6125..17947282ceb 100644 --- a/keyboards/melgeek/mj64/rev2/rev2.c +++ b/keyboards/melgeek/mj64/rev2/rev2.c @@ -110,13 +110,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/melgeek/mj64/rev3/rev3.c b/keyboards/melgeek/mj64/rev3/rev3.c index 7af80c7388f..8555082e7d9 100644 --- a/keyboards/melgeek/mj64/rev3/rev3.c +++ b/keyboards/melgeek/mj64/rev3/rev3.c @@ -116,13 +116,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/melgeek/mj65/rev3/rev3.c b/keyboards/melgeek/mj65/rev3/rev3.c index 1392d5af4e5..0a020fad743 100644 --- a/keyboards/melgeek/mj65/rev3/rev3.c +++ b/keyboards/melgeek/mj65/rev3/rev3.c @@ -120,14 +120,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - #endif diff --git a/keyboards/melgeek/mojo75/rev1/rev1.c b/keyboards/melgeek/mojo75/rev1/rev1.c index 18daafebf8d..60bb6eb8506 100644 --- a/keyboards/melgeek/mojo75/rev1/rev1.c +++ b/keyboards/melgeek/mojo75/rev1/rev1.c @@ -139,14 +139,4 @@ led_config_t g_led_config = { } }; - -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c index 435083a269d..6cbbed412d6 100644 --- a/keyboards/percent/canoe_gen2/canoe_gen2.c +++ b/keyboards/percent/canoe_gen2/canoe_gen2.c @@ -18,15 +18,6 @@ along with this program. If not, see . #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} led_config_t g_led_config = { { // Key Matrix to LED Index diff --git a/keyboards/phase_studio/titan65/hotswap/hotswap.c b/keyboards/phase_studio/titan65/hotswap/hotswap.c index 6df8319a830..1bcd581785a 100644 --- a/keyboards/phase_studio/titan65/hotswap/hotswap.c +++ b/keyboards/phase_studio/titan65/hotswap/hotswap.c @@ -39,13 +39,4 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif diff --git a/keyboards/phase_studio/titan65/hotswap/keyboard.json b/keyboards/phase_studio/titan65/hotswap/keyboard.json index 8bf3152b903..956f5087018 100644 --- a/keyboards/phase_studio/titan65/hotswap/keyboard.json +++ b/keyboards/phase_studio/titan65/hotswap/keyboard.json @@ -20,7 +20,8 @@ }, "rgb_matrix": { "driver": "ws2812", - "max_brightness": 150 + "max_brightness": 150, + "sleep": true }, "matrix_pins": { "cols": ["B0", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "D5", "F0", "F1", "C7", "F4", "F5", "F6"], diff --git a/keyboards/planck/light/keyboard.json b/keyboards/planck/light/keyboard.json index 33801562e56..dd1d69bf3cc 100644 --- a/keyboards/planck/light/keyboard.json +++ b/keyboards/planck/light/keyboard.json @@ -54,7 +54,8 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "is31fl3731" + "driver": "is31fl3731", + "sleep": true }, "features": { "audio": true, diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index 8bbb8119c96..43487e2e218 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c @@ -115,18 +115,6 @@ uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t return 0; } -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/sowbug/68keys/68keys.c b/keyboards/sowbug/68keys/68keys.c index 8c7394d75b2..df9681481f1 100644 --- a/keyboards/sowbug/68keys/68keys.c +++ b/keyboards/sowbug/68keys/68keys.c @@ -33,13 +33,4 @@ led_config_t g_led_config = { { } }; -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); -} #endif // #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/sowbug/68keys/keyboard.json b/keyboards/sowbug/68keys/keyboard.json index 2b8f7da3d50..7143f341b5c 100644 --- a/keyboards/sowbug/68keys/keyboard.json +++ b/keyboards/sowbug/68keys/keyboard.json @@ -58,7 +58,8 @@ "solid_multisplash": true }, "driver": "ws2812", - "max_brightness": 128 + "max_brightness": 128, + "sleep": true }, "features": { "bootmagic": true, diff --git a/keyboards/sowbug/ansi_tkl/ansi_tkl.c b/keyboards/sowbug/ansi_tkl/ansi_tkl.c index 284cd612dd3..508bf62fe10 100644 --- a/keyboards/sowbug/ansi_tkl/ansi_tkl.c +++ b/keyboards/sowbug/ansi_tkl/ansi_tkl.c @@ -47,13 +47,4 @@ led_config_t g_led_config = {{ } }; -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); -} #endif // #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/sowbug/ansi_tkl/keyboard.json b/keyboards/sowbug/ansi_tkl/keyboard.json index 69f78cba6d4..837e08a59e3 100644 --- a/keyboards/sowbug/ansi_tkl/keyboard.json +++ b/keyboards/sowbug/ansi_tkl/keyboard.json @@ -58,7 +58,8 @@ "solid_multisplash": true }, "driver": "ws2812", - "max_brightness": 128 + "max_brightness": 128, + "sleep": true }, "features": { "bootmagic": true,