-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: pwm: nrf: nrf pwm driver modification to use DT #11726
drivers: pwm: nrf: nrf pwm driver modification to use DT #11726
Conversation
This pull request is done as part of issue 8758. This pull request fixes issue 10035. This pull request assumes issue 6958 will be merged and function get_cycles_per_sec() will eventually be removed. Setting duty to either 0% or 100% for all channels of a PWM instance will disable the peripheral, see 9507 - if better semantics are introduced, this should be fixed in this driver as well. |
Codecov Report
@@ Coverage Diff @@
## master #11726 +/- ##
=======================================
Coverage 48.13% 48.13%
=======================================
Files 281 281
Lines 43425 43425
Branches 10406 10406
=======================================
Hits 20902 20902
Misses 18368 18368
Partials 4155 4155 Continue to review full report at Codecov.
|
634e847
to
a624026
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is only the nrf52_pca10040 board DTS fixed?
a624026
to
4470988
Compare
9fd8245
to
21a3041
Compare
All checks are passing now. Review history of this comment for details about previous failed status. |
21a3041
to
3cde910
Compare
@ioannisg @anangl @Mierunski can you re-review please? |
Split these changes into several commits. Use separate commits for logically related changes (for instance, don't add DTS entries and change PWM prescaler handling in one commit as these things are unrelated). |
Ok. Will split these changes into multiple commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one DT change to the binding.
3cde910
to
960ccae
Compare
DT binding was changed to boolean
The changes are split but all the commits have the same title, which is not always adequate to what is actually changed by the commit (for instance the first commit add only dts entries and bindings, but the title says "drivers: pwm: nrf: ..."). |
Got it, will change the wording of the commit message to be more clear |
a0ee886
to
7a33b56
Compare
@anangl - Please see if changes were OK. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Two minor corrections suggested.
203d29a
to
ea8aa9e
Compare
ea8aa9e
to
e805c0d
Compare
Thanks @anangl - The last force-push was just to align some indentation in pwm_nrfx.c |
@gamnes can you fix CI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few nitpicks
@Mierunski can you take another look? |
e805c0d
to
4249544
Compare
1. PWM device node added with alias to all nRF52x DTSI files. 1 instance for nRF52810, 3 instances for nRF52832, and 4 instance for nRF52840. 2. Added yaml binding for Nordic PWM node. Signed-off-by: Gaute Gamnes <[email protected]>
1. Kconfig options CH pin removed. 2. Kconfig options CH inverted removed. 3. Modified pwm_nrfx.c driver to use DT defines instead of Kconfig. Signed-off-by: Gaute Gamnes <[email protected]>
1. Kconfig options clock_prescaler removed. 2. Rewritten pwm_nrfx.c nRF HW PWM driver. Signed-off-by: Gaute Gamnes <[email protected]>
1. Modified fade_led PWM example to include nRF HW PWM option. 2. Added fade_led nrf52_pca10040.overlay in order to enable PWM node and choose output PWM GPIO for channel 0. Channel 1 GPIO enable but not used in sample src. Signed-off-by: Gaute Gamnes <[email protected]>
4249544
to
43c18de
Compare
Latest force-push was rebase onto upstream master. |
nRF5x DTSI files.
include nRF HW PWM option.
Fixes #10035
Signed-off-by: Gaute Gamnes [email protected]