diff --git a/board/bolt/board.c b/board/bolt/board.c index 1a89534388..3d88c762d8 100644 --- a/board/bolt/board.c +++ b/board/bolt/board.c @@ -181,10 +181,10 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_FAN] = {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, - [PWM_CH_KBLIGHT] = {4, 0}, + {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, + {4, 0}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/falco/board.c b/board/falco/board.c index adc6cbddfb..b7f434d056 100644 --- a/board/falco/board.c +++ b/board/falco/board.c @@ -184,9 +184,9 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_FAN] = {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, + {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/kirby/board.c b/board/kirby/board.c index 4cac7b6d9f..ca88e1416f 100644 --- a/board/kirby/board.c +++ b/board/kirby/board.c @@ -106,13 +106,13 @@ const struct gpio_alt_func gpio_alt_funcs[] = { }; const int gpio_alt_funcs_count = ARRAY_SIZE(gpio_alt_funcs); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_CHG_Y] = {STM32_TIM(3), STM32_TIM_CH(1), PWM_CONFIG_ACTIVE_LOW, + {STM32_TIM(3), STM32_TIM_CH(1), PWM_CONFIG_ACTIVE_LOW, GPIO_CHG_LED_Y}, - [PWM_CH_CHG_G] = {STM32_TIM(3), STM32_TIM_CH(2), PWM_CONFIG_ACTIVE_LOW, + {STM32_TIM(3), STM32_TIM_CH(2), PWM_CONFIG_ACTIVE_LOW, GPIO_CHG_LED_G}, - [PWM_CH_CHG_R] = {STM32_TIM(3), STM32_TIM_CH(3), PWM_CONFIG_ACTIVE_LOW, + {STM32_TIM(3), STM32_TIM_CH(3), PWM_CONFIG_ACTIVE_LOW, GPIO_CHG_LED_R}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/link/board.c b/board/link/board.c index 2b4fb9aeaf..4d6edbb2ed 100644 --- a/board/link/board.c +++ b/board/link/board.c @@ -182,10 +182,10 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_FAN] = {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, - [PWM_CH_KBLIGHT] = {1, 0}, + {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, + {1, 0}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/peppy/board.c b/board/peppy/board.c index 730e1e17d9..f1d55dd738 100644 --- a/board/peppy/board.c +++ b/board/peppy/board.c @@ -176,9 +176,9 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_FAN] = {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, + {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/pit/board.c b/board/pit/board.c index 9f4ca08a1e..ba9fb7252d 100644 --- a/board/pit/board.c +++ b/board/pit/board.c @@ -124,10 +124,10 @@ struct keyboard_scan_config keyscan_config = { }, }; -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_POWER_LED] = {STM32_TIM(2), STM32_TIM_CH(3), - PWM_CONFIG_ACTIVE_LOW, GPIO_LED_POWER_L}, + {STM32_TIM(2), STM32_TIM_CH(3), + PWM_CONFIG_ACTIVE_LOW, GPIO_LED_POWER_L}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/puppy/board.c b/board/puppy/board.c index f874ed2ad5..db275818ab 100644 --- a/board/puppy/board.c +++ b/board/puppy/board.c @@ -109,10 +109,10 @@ const struct i2c_port_t i2c_ports[] = { }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_POWER_LED] = {STM32_TIM(2), STM32_TIM_CH(3), - PWM_CONFIG_ACTIVE_LOW, GPIO_LED_POWER_L}, + {STM32_TIM(2), STM32_TIM_CH(3), + PWM_CONFIG_ACTIVE_LOW, GPIO_LED_POWER_L}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/rambi/board.c b/board/rambi/board.c index 7a6f926763..0ba70a89be 100644 --- a/board/rambi/board.c +++ b/board/rambi/board.c @@ -150,10 +150,10 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_LED_GREEN] = {4, PWM_CONFIG_ACTIVE_LOW}, - [PWM_CH_LED_RED] = {3, PWM_CONFIG_ACTIVE_LOW}, + {4, PWM_CONFIG_ACTIVE_LOW}, + {3, PWM_CONFIG_ACTIVE_LOW}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/samus/board.c b/board/samus/board.c index e649836b89..f729ce46f8 100644 --- a/board/samus/board.c +++ b/board/samus/board.c @@ -180,10 +180,10 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_FAN] = {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, - [PWM_CH_KBLIGHT] = {4, 0}, + {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, + {4, 0}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/slippy/board.c b/board/slippy/board.c index df46ddfb02..cf937ead4f 100644 --- a/board/slippy/board.c +++ b/board/slippy/board.c @@ -174,9 +174,9 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_FAN] = {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, + {CONFIG_FAN_CH_CPU, PWM_CONFIG_HAS_RPM_MODE}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/snow/board.c b/board/snow/board.c index 4120356175..cf09e189e9 100644 --- a/board/snow/board.c +++ b/board/snow/board.c @@ -122,10 +122,10 @@ const struct i2c_port_t i2c_ports[] = { }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_POWER_LED] = {STM32_TIM(2), STM32_TIM_CH(2), - PWM_CONFIG_ACTIVE_LOW, GPIO_LED_POWER_L}, + {STM32_TIM(2), STM32_TIM_CH(2), + PWM_CONFIG_ACTIVE_LOW, GPIO_LED_POWER_L}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); diff --git a/board/spring/board.c b/board/spring/board.c index fd9acaf6d5..09e943d8f7 100644 --- a/board/spring/board.c +++ b/board/spring/board.c @@ -120,10 +120,9 @@ const struct adc_t adc_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -/* PWM channels */ +/* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_ILIM] = {STM32_TIM(3), STM32_TIM_CH(1), 0, - GPIO_ILIM}, + {STM32_TIM(3), STM32_TIM_CH(1), 0, GPIO_ILIM}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);