Skip to content

Commit

Permalink
pwm: stm32: Remove support for deprecated st,prescaler prop
Browse files Browse the repository at this point in the history
Remove code that supported deprecated st,prescaler devicetree property.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak authored and carlescufi committed Aug 18, 2022
1 parent 3470d61 commit 9a7e4b1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/pwm/pwm_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,13 +711,6 @@ static void pwm_stm32_irq_config_func_##index(const struct device *dev) \
.enr = DT_CLOCKS_CELL(DT_INST_PARENT(index), bits) \
}

/* Print warning if any pwm node has 'st,prescaler' property */
#define PRESCALER_PWM(index) DT_INST_NODE_HAS_PROP(index, st_prescaler) ||
#if (DT_INST_FOREACH_STATUS_OKAY(PRESCALER_PWM) 0)
#warning "DT property 'st,prescaler' in pwm node is deprecated and should be \
replaced by 'st,prescaler' property in parent node, aka timers"
#endif

#define PWM_DEVICE_INIT(index) \
static struct pwm_stm32_data pwm_stm32_data_##index; \
IRQ_CONFIG_FUNC(index) \
Expand All @@ -726,10 +719,7 @@ replaced by 'st,prescaler' property in parent node, aka timers"
\
static const struct pwm_stm32_config pwm_stm32_config_##index = { \
.timer = (TIM_TypeDef *)DT_REG_ADDR(DT_INST_PARENT(index)), \
/* For compatibility reason, use pwm st_prescaler property */ \
/* if exist, otherwise use parent (timers) property */ \
.prescaler = DT_INST_PROP_OR(index, st_prescaler, \
(DT_PROP(DT_INST_PARENT(index), st_prescaler))), \
.prescaler = DT_PROP(DT_INST_PARENT(index), st_prescaler), \
.countermode = DT_PROP(DT_INST_PARENT(index), st_countermode), \
.pclken = DT_INST_CLK(index, timer), \
.pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(index), \
Expand Down

0 comments on commit 9a7e4b1

Please sign in to comment.