You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CONFIG_PWM_MULTICHAN seems to be redundant and unnecessarily complicates the PWM implementation in arch/. We can achieve the same functionality as CONFIG_PWM_MUTLICHAN=n by just setting CONFIG_PWM_NCHANNELS=1 which is the default value in Kconfig.
If a given architecture doesn't support multichanel PWM, then we can just add a simple #if CONFIG_PWM_NCHANNELS > 1 which returns a compilation error.
Verification
I have verified before submitting the report.
The text was updated successfully, but these errors were encountered:
According to git, this symbol was added by @augustofg sometime ago, but I think the original support to PWM multi-channel was created by other people (my memory state that it was created by you or Matias Nitsche @protobits).
@acassis multichan PWM was added loooong time ago in e8c2466.
I have no idea why it was done this way, but I think it can be done better by avoiding unnecessary complication of the code. To be clear: this code works fine for many years and no one seems to have complained before. This issue aims to find out the community's opinion, whether anyone has any objections to proposed change :)
Hi all, just please note that this might be a breaking API change, since it is safe to assume applications are using CONFIG_PWM_MULTICHAN to determine how to access pwm_info_s structure. That said, I completely agree with the removal of CONFIG_PWM_MULTICHAN option.
I have proposed other breaking change several months ago in #12381 that simplifies pwm_info_s and would possibly also make CONFIG_PWM_MULTICHAN obsolete. I have not done much work on it as it is not my priority now, just some initial tests with SAMv7 build, you can see this commit michallenc@8224f0e (though I still used multichan config there, but it shouldn't be problem to remove it). We would basically shrink the entire PWM structure to
Description
CONFIG_PWM_MULTICHAN
seems to be redundant and unnecessarily complicates the PWM implementation inarch/
. We can achieve the same functionality asCONFIG_PWM_MUTLICHAN=n
by just settingCONFIG_PWM_NCHANNELS=1
which is the default value in Kconfig.If a given architecture doesn't support multichanel PWM, then we can just add a simple
#if CONFIG_PWM_NCHANNELS > 1
which returns a compilation error.Verification
The text was updated successfully, but these errors were encountered: