I’d say he cleanest way is to do it at the SoC level, like this:
That way every single board that enables CONFIG_PWM in its defconfig (or any application that enables CONFIG_PWM) will be enabling CONFIG_PWM_SAM. But boards or applications that do not enable CONFIG_PWM will have CONFIG_PWM_SAM disabled.
<devel@...> on behalf of "Michael Hope via lists.zephyrproject.org" <michaelh=juju.nz@...>
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:
depends on PWM
section to Kconfig.board?