From c28d372d3324f99300dde016bdcbafd4550de643 Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Sat, 10 Jul 2021 12:40:50 +0200 Subject: [PATCH] drivers: pwm: nrf_sw: drop deprecated 'timer-instance' DT prop This property has been marked as deprecated in 2.5.0 and was replaced by 'generator' property. Signed-off-by: Marcin Niestroj --- drivers/pwm/pwm_nrf5_sw.c | 15 --------------- dts/bindings/pwm/nordic,nrf-sw-pwm.yaml | 10 +--------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/pwm/pwm_nrf5_sw.c b/drivers/pwm/pwm_nrf5_sw.c index 08a2eca9859..7a62a2192dd 100644 --- a/drivers/pwm/pwm_nrf5_sw.c +++ b/drivers/pwm/pwm_nrf5_sw.c @@ -16,19 +16,6 @@ #include LOG_MODULE_REGISTER(pwm_nrf5_sw); -BUILD_ASSERT(DT_INST_NODE_HAS_PROP(0, timer_instance) != - DT_INST_NODE_HAS_PROP(0, generator), - "Please define either the timer-instance or generator property, but not both"); - -#if DT_INST_NODE_HAS_PROP(0, timer_instance) - -#define USE_RTC 0 -#define GENERATOR_ADDR _CONCAT(NRF_TIMER, DT_INST_PROP(0, timer_instance)) -#define GENERATOR_CC_NUM \ - _CONCAT(_CONCAT(TIMER, DT_INST_PROP(0, timer_instance)), _CC_NUM) - -#else /* DT_INST_NODE_HAS_PROP(0, timer_instance) */ - #define GENERATOR_NODE DT_PHANDLE(DT_DRV_INST(0), generator) #define GENERATOR_CC_NUM DT_PROP(GENERATOR_NODE, cc_num) @@ -42,8 +29,6 @@ BUILD_ASSERT(DT_INST_PROP(0, clock_prescaler) == 0, #define GENERATOR_ADDR ((NRF_TIMER_Type *) DT_REG_ADDR(GENERATOR_NODE)) #endif -#endif /* DT_INST_NODE_HAS_PROP(0, timer_instance) */ - /* One compare channel is needed to set the PWM period, hence +1. */ #if ((DT_INST_PROP(0, channel_count) + 1) > GENERATOR_CC_NUM) #error "Invalid number of PWM channels configured." diff --git a/dts/bindings/pwm/nordic,nrf-sw-pwm.yaml b/dts/bindings/pwm/nordic,nrf-sw-pwm.yaml index d0aec31a9a1..9770a75d151 100644 --- a/dts/bindings/pwm/nordic,nrf-sw-pwm.yaml +++ b/dts/bindings/pwm/nordic,nrf-sw-pwm.yaml @@ -9,15 +9,7 @@ properties: type: phandle description: | Reference to TIMER or RTC instance for generating PWM output signals - required: false - - timer-instance: - type: int - description: | - Timer instance to use for generating the PWM output signals. Deprecated - in favour of 'generator' property. - required: false - deprecated: true + required: true channel-count: type: int