drivers: pwm_nrfx: Clean up driver instantiation
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance drivers when creating particular driver instances - remove unnecessary hidden Kconfig options that indicated the type of peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS) and enabled proper nrfx driver instance; instead, use one option per peripheral type and include the corresponding shim driver flavor into compilation basing on that option (not the one that enables the nrfx driver as it was incorrectly done so far in some cases) Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
fb7d40c757
commit
8bc0fdaf56
1 changed files with 4 additions and 4 deletions
|
@ -351,18 +351,18 @@ static int pwm_nrfx_pm_action(const struct device *dev,
|
|||
POST_KERNEL, CONFIG_PWM_INIT_PRIORITY, \
|
||||
&pwm_nrfx_drv_api_funcs)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm0), okay)
|
||||
#ifdef CONFIG_HAS_HW_NRF_PWM0
|
||||
PWM_NRFX_DEVICE(0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay)
|
||||
#ifdef CONFIG_HAS_HW_NRF_PWM1
|
||||
PWM_NRFX_DEVICE(1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay)
|
||||
#ifdef CONFIG_HAS_HW_NRF_PWM2
|
||||
PWM_NRFX_DEVICE(2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay)
|
||||
#ifdef CONFIG_HAS_HW_NRF_PWM3
|
||||
PWM_NRFX_DEVICE(3);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue