Optional drivers and board configuration


Michael Hope
 

Hi there.  I'm adding a new SAM0 based board.  What's the best way to enable optional peripherals?  For example, not all users need the PWM driver.  Should I:

- Put CONFIG_PWM=y and CONFIG_PWM_SAM0=y in defconfig and live with the unneeded code?
- Put CONFIG_PWM_SAM0=y in defconfig and ignore the warning?
- or add a

config PWM_SAM0
    default y
    depends on PWM

section to Kconfig.board?

Thanks,

-- Michael

Join devel@lists.zephyrproject.org to automatically receive all group messages.