drivers: pwm: nrfx: Convert to use DTS NODELABEL for instance detection
Move to using NODELABEL references to enable driver instances for PWM0..3. This will allow us to remove per-instance PWM Kconfig symbols. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
ae68354428
commit
b04b399d63
2 changed files with 8 additions and 8 deletions
|
@ -6,9 +6,9 @@ config PWM_NRFX
|
|||
default y
|
||||
depends on HAS_HW_NRF_PWM0 || HAS_HW_NRF_PWM1 || \
|
||||
HAS_HW_NRF_PWM2 || HAS_HW_NRF_PWM3
|
||||
select NRFX_PWM0 if PWM_0
|
||||
select NRFX_PWM1 if PWM_1
|
||||
select NRFX_PWM2 if PWM_2
|
||||
select NRFX_PWM3 if PWM_3
|
||||
select NRFX_PWM0 if "$(dt_nodelabel_enabled,pwm0)"
|
||||
select NRFX_PWM1 if "$(dt_nodelabel_enabled,pwm1)"
|
||||
select NRFX_PWM2 if "$(dt_nodelabel_enabled,pwm2)"
|
||||
select NRFX_PWM3 if "$(dt_nodelabel_enabled,pwm3)"
|
||||
help
|
||||
Enable support for nrfx Hardware PWM driver for nRF52 MCU series.
|
||||
|
|
|
@ -422,18 +422,18 @@ static int pwm_nrfx_pm_control(struct device *dev,
|
|||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&pwm_nrfx_drv_api_funcs)
|
||||
|
||||
#ifdef CONFIG_PWM_0
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm0))
|
||||
PWM_NRFX_DEVICE(0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PWM_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
PWM_NRFX_DEVICE(1);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PWM_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
PWM_NRFX_DEVICE(2);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PWM_3
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm3))
|
||||
PWM_NRFX_DEVICE(3);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue