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 <m.niestroj@emb.dev>
This commit is contained in:
parent
287b7c497f
commit
c28d372d33
2 changed files with 1 additions and 24 deletions
|
@ -16,19 +16,6 @@
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_REGISTER(pwm_nrf5_sw);
|
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_NODE DT_PHANDLE(DT_DRV_INST(0), generator)
|
||||||
#define GENERATOR_CC_NUM DT_PROP(GENERATOR_NODE, cc_num)
|
#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))
|
#define GENERATOR_ADDR ((NRF_TIMER_Type *) DT_REG_ADDR(GENERATOR_NODE))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* DT_INST_NODE_HAS_PROP(0, timer_instance) */
|
|
||||||
|
|
||||||
/* One compare channel is needed to set the PWM period, hence +1. */
|
/* One compare channel is needed to set the PWM period, hence +1. */
|
||||||
#if ((DT_INST_PROP(0, channel_count) + 1) > GENERATOR_CC_NUM)
|
#if ((DT_INST_PROP(0, channel_count) + 1) > GENERATOR_CC_NUM)
|
||||||
#error "Invalid number of PWM channels configured."
|
#error "Invalid number of PWM channels configured."
|
||||||
|
|
|
@ -9,15 +9,7 @@ properties:
|
||||||
type: phandle
|
type: phandle
|
||||||
description: |
|
description: |
|
||||||
Reference to TIMER or RTC instance for generating PWM output signals
|
Reference to TIMER or RTC instance for generating PWM output signals
|
||||||
required: false
|
required: true
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
channel-count:
|
channel-count:
|
||||||
type: int
|
type: int
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue