From 38125f3da3eadd3533508ae5a0e53904269baaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Sat, 4 Apr 2020 17:31:52 +0200 Subject: [PATCH] Remove redundant CONFIG_NUM_LED_PINS --- boards/Kconfig.hidden | 5 ----- boards/arm/mppt_1210_hus_0v4/Kconfig.defconfig | 3 --- boards/arm/mppt_1210_hus_0v4/board.h | 4 ++-- boards/arm/mppt_1210_hus_0v4/pinmux.c | 4 ++-- boards/arm/mppt_1210_hus_0v7/Kconfig.defconfig | 3 --- boards/arm/mppt_1210_hus_0v7/board.h | 4 ++-- boards/arm/mppt_1210_hus_0v7/pinmux.c | 6 +++--- boards/arm/mppt_2420_hpx/Kconfig.defconfig | 3 --- boards/arm/mppt_2420_hpx/board.h | 4 ++-- boards/arm/mppt_2420_hpx/pinmux.c | 4 ++-- boards/arm/mppt_2420_lc_0v10/Kconfig.defconfig | 3 --- boards/arm/mppt_2420_lc_0v10/board.h | 4 ++-- boards/arm/mppt_2420_lc_0v10/pinmux.c | 4 ++-- boards/arm/pwm_2420_lus_0v3/Kconfig.defconfig | 3 --- boards/arm/pwm_2420_lus_0v3/board.h | 4 ++-- boards/arm/pwm_2420_lus_0v3/pinmux.c | 4 ++-- 16 files changed, 21 insertions(+), 41 deletions(-) diff --git a/boards/Kconfig.hidden b/boards/Kconfig.hidden index 89779a8..8dabc84 100644 --- a/boards/Kconfig.hidden +++ b/boards/Kconfig.hidden @@ -24,11 +24,6 @@ config HAS_USB_PWR_OUTPUT help PCB has a USB power output. -config NUM_LED_PINS - int - help - Number of LED pins for charlieplexing. - config CONTROL_FREQUENCY int default 10 diff --git a/boards/arm/mppt_1210_hus_0v4/Kconfig.defconfig b/boards/arm/mppt_1210_hus_0v4/Kconfig.defconfig index e262c6b..6dfe225 100755 --- a/boards/arm/mppt_1210_hus_0v4/Kconfig.defconfig +++ b/boards/arm/mppt_1210_hus_0v4/Kconfig.defconfig @@ -12,9 +12,6 @@ config HAS_LOAD_OUTPUT config HAS_USB_PWR_OUTPUT default y -config NUM_LED_PINS - default 5 - if UART_CONSOLE config UART_2 diff --git a/boards/arm/mppt_1210_hus_0v4/board.h b/boards/arm/mppt_1210_hus_0v4/board.h index dd1b4c0..7788b48 100644 --- a/boards/arm/mppt_1210_hus_0v4/board.h +++ b/boards/arm/mppt_1210_hus_0v4/board.h @@ -44,8 +44,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT }; #define NUM_LED_PINS 5 // defined in board definition pinmux.c -extern const char *led_ports[CONFIG_NUM_LED_PINS]; -extern const int led_pins[CONFIG_NUM_LED_PINS]; +extern const char *led_ports[NUM_LED_PINS]; +extern const int led_pins[NUM_LED_PINS]; const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = { { PIN_HIGH, PIN_LOW, PIN_LOW, PIN_LOW, PIN_LOW }, // LED1 diff --git a/boards/arm/mppt_1210_hus_0v4/pinmux.c b/boards/arm/mppt_1210_hus_0v4/pinmux.c index 7d6a533..893e737 100755 --- a/boards/arm/mppt_1210_hus_0v4/pinmux.c +++ b/boards/arm/mppt_1210_hus_0v4/pinmux.c @@ -62,14 +62,14 @@ static int pinmux_stm32_init(struct device *port) SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); -const char *led_ports[CONFIG_NUM_LED_PINS] = { +const char *led_ports[] = { DT_GPIO_LEDS_GND_GPIOS_CONTROLLER, DT_GPIO_LEDS_SOC12_GPIOS_CONTROLLER, DT_GPIO_LEDS_SOC3_GPIOS_CONTROLLER, DT_GPIO_LEDS_RXTX_GPIOS_CONTROLLER, DT_GPIO_LEDS_LOAD_GPIOS_CONTROLLER }; -const int led_pins[CONFIG_NUM_LED_PINS] = { +const int led_pins[] = { DT_GPIO_LEDS_GND_GPIOS_PIN, DT_GPIO_LEDS_SOC12_GPIOS_PIN, DT_GPIO_LEDS_SOC3_GPIOS_PIN, diff --git a/boards/arm/mppt_1210_hus_0v7/Kconfig.defconfig b/boards/arm/mppt_1210_hus_0v7/Kconfig.defconfig index 6975888..6bb595c 100755 --- a/boards/arm/mppt_1210_hus_0v7/Kconfig.defconfig +++ b/boards/arm/mppt_1210_hus_0v7/Kconfig.defconfig @@ -12,9 +12,6 @@ config HAS_LOAD_OUTPUT config HAS_USB_PWR_OUTPUT default y -config NUM_LED_PINS - default 3 - if UART_CONSOLE config UART_2 diff --git a/boards/arm/mppt_1210_hus_0v7/board.h b/boards/arm/mppt_1210_hus_0v7/board.h index c3b3ce2..53103f7 100644 --- a/boards/arm/mppt_1210_hus_0v7/board.h +++ b/boards/arm/mppt_1210_hus_0v7/board.h @@ -53,8 +53,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT }; #define NUM_LED_PINS 3 // defined in board definition pinmux.c -extern const char *led_ports[CONFIG_NUM_LED_PINS]; -extern const int led_pins[CONFIG_NUM_LED_PINS]; +extern const char *led_ports[NUM_LED_PINS]; +extern const int led_pins[NUM_LED_PINS]; static const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = { { PIN_HIGH, PIN_LOW, PIN_FLOAT }, // LED1 diff --git a/boards/arm/mppt_1210_hus_0v7/pinmux.c b/boards/arm/mppt_1210_hus_0v7/pinmux.c index 79e0e7a..41f6a4d 100755 --- a/boards/arm/mppt_1210_hus_0v7/pinmux.c +++ b/boards/arm/mppt_1210_hus_0v7/pinmux.c @@ -62,13 +62,13 @@ static int pinmux_stm32_init(struct device *port) SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); -const char *led_ports[CONFIG_NUM_LED_PINS] = { +const char *led_ports[] = { DT_GPIO_LEDS_A_GPIOS_CONTROLLER, DT_GPIO_LEDS_C_GPIOS_CONTROLLER, DT_GPIO_LEDS_B_GPIOS_CONTROLLER, }; -const int led_pins[CONFIG_NUM_LED_PINS] = { +const int led_pins[] = { DT_GPIO_LEDS_A_GPIOS_PIN, DT_GPIO_LEDS_C_GPIOS_PIN, DT_GPIO_LEDS_B_GPIOS_PIN, -}; \ No newline at end of file +}; diff --git a/boards/arm/mppt_2420_hpx/Kconfig.defconfig b/boards/arm/mppt_2420_hpx/Kconfig.defconfig index f6ea61b..a86af23 100644 --- a/boards/arm/mppt_2420_hpx/Kconfig.defconfig +++ b/boards/arm/mppt_2420_hpx/Kconfig.defconfig @@ -9,9 +9,6 @@ config BOARD config HAS_LOAD_OUTPUT default y -config NUM_LED_PINS - default 1 - if UART_CONSOLE config UART_1 diff --git a/boards/arm/mppt_2420_hpx/board.h b/boards/arm/mppt_2420_hpx/board.h index 12e315b..b127e92 100644 --- a/boards/arm/mppt_2420_hpx/board.h +++ b/boards/arm/mppt_2420_hpx/board.h @@ -42,8 +42,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT }; #define NUM_LED_PINS 1 // defined in board definition pinmux.c -extern const char *led_ports[CONFIG_NUM_LED_PINS]; -extern const int led_pins[CONFIG_NUM_LED_PINS]; +extern const char *led_ports[NUM_LED_PINS]; +extern const int led_pins[NUM_LED_PINS]; const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = { { PIN_HIGH }, // LED1 diff --git a/boards/arm/mppt_2420_hpx/pinmux.c b/boards/arm/mppt_2420_hpx/pinmux.c index 93a7bf9..783773e 100644 --- a/boards/arm/mppt_2420_hpx/pinmux.c +++ b/boards/arm/mppt_2420_hpx/pinmux.c @@ -91,9 +91,9 @@ SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); -const char *led_ports[CONFIG_NUM_LED_PINS] = { +const char *led_ports[] = { DT_GPIO_LEDS_PWR_GPIOS_CONTROLLER, }; -const int led_pins[CONFIG_NUM_LED_PINS] = { +const int led_pins[] = { DT_GPIO_LEDS_PWR_GPIOS_PIN, }; diff --git a/boards/arm/mppt_2420_lc_0v10/Kconfig.defconfig b/boards/arm/mppt_2420_lc_0v10/Kconfig.defconfig index cb98cad..7adc474 100755 --- a/boards/arm/mppt_2420_lc_0v10/Kconfig.defconfig +++ b/boards/arm/mppt_2420_lc_0v10/Kconfig.defconfig @@ -9,9 +9,6 @@ config BOARD config HAS_LOAD_OUTPUT default y -config NUM_LED_PINS - default 2 - if UART_CONSOLE config UART_2 diff --git a/boards/arm/mppt_2420_lc_0v10/board.h b/boards/arm/mppt_2420_lc_0v10/board.h index becfc0b..7cd8a01 100644 --- a/boards/arm/mppt_2420_lc_0v10/board.h +++ b/boards/arm/mppt_2420_lc_0v10/board.h @@ -57,8 +57,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT }; #define NUM_LED_PINS 2 // defined in board definition pinmux.c -extern const char *led_ports[CONFIG_NUM_LED_PINS]; -extern const int led_pins[CONFIG_NUM_LED_PINS]; +extern const char *led_ports[NUM_LED_PINS]; +extern const int led_pins[NUM_LED_PINS]; static const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = { { PIN_HIGH, PIN_LOW }, // LED1 diff --git a/boards/arm/mppt_2420_lc_0v10/pinmux.c b/boards/arm/mppt_2420_lc_0v10/pinmux.c index 1a4c280..001bca3 100755 --- a/boards/arm/mppt_2420_lc_0v10/pinmux.c +++ b/boards/arm/mppt_2420_lc_0v10/pinmux.c @@ -68,11 +68,11 @@ static int pinmux_stm32_init(struct device *port) SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); -const char *led_ports[CONFIG_NUM_LED_PINS] = { +const char *led_ports[] = { DT_GPIO_LEDS_PWR_GPIOS_CONTROLLER, DT_GPIO_LEDS_LOAD_GPIOS_CONTROLLER }; -const int led_pins[CONFIG_NUM_LED_PINS] = { +const int led_pins[] = { DT_GPIO_LEDS_PWR_GPIOS_PIN, DT_GPIO_LEDS_LOAD_GPIOS_PIN }; diff --git a/boards/arm/pwm_2420_lus_0v3/Kconfig.defconfig b/boards/arm/pwm_2420_lus_0v3/Kconfig.defconfig index 3408898..50a99f7 100644 --- a/boards/arm/pwm_2420_lus_0v3/Kconfig.defconfig +++ b/boards/arm/pwm_2420_lus_0v3/Kconfig.defconfig @@ -12,9 +12,6 @@ config HAS_LOAD_OUTPUT config HAS_USB_PWR_OUTPUT default y -config NUM_LED_PINS - default 3 - if UART_CONSOLE config UART_2 diff --git a/boards/arm/pwm_2420_lus_0v3/board.h b/boards/arm/pwm_2420_lus_0v3/board.h index 84b5325..9e3b274 100644 --- a/boards/arm/pwm_2420_lus_0v3/board.h +++ b/boards/arm/pwm_2420_lus_0v3/board.h @@ -63,8 +63,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT }; #define NUM_LED_PINS 3 // defined in board definition pinmux.c -extern const char *led_ports[CONFIG_NUM_LED_PINS]; -extern const int led_pins[CONFIG_NUM_LED_PINS]; +extern const char *led_ports[NUM_LED_PINS]; +extern const int led_pins[NUM_LED_PINS]; #ifndef LEDS_WRONG_POLARITY static const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = { diff --git a/boards/arm/pwm_2420_lus_0v3/pinmux.c b/boards/arm/pwm_2420_lus_0v3/pinmux.c index d5c57b3..281af75 100644 --- a/boards/arm/pwm_2420_lus_0v3/pinmux.c +++ b/boards/arm/pwm_2420_lus_0v3/pinmux.c @@ -55,12 +55,12 @@ static int pinmux_stm32_init(struct device *port) SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); -const char *led_ports[CONFIG_NUM_LED_PINS] = { +const char *led_ports[] = { DT_GPIO_LEDS_A_GPIOS_CONTROLLER, DT_GPIO_LEDS_B_GPIOS_CONTROLLER, DT_GPIO_LEDS_C_GPIOS_CONTROLLER, }; -const int led_pins[CONFIG_NUM_LED_PINS] = { +const int led_pins[] = { DT_GPIO_LEDS_A_GPIOS_PIN, DT_GPIO_LEDS_B_GPIOS_PIN, DT_GPIO_LEDS_C_GPIOS_PIN,