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:
Kumar Gala 2020-05-05 05:46:57 -05:00 committed by Kumar Gala
commit b04b399d63
2 changed files with 8 additions and 8 deletions

View file

@ -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