-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers: rename ads101x driver to ads1x1x #21731
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
Conversation
464f63b to
43e3aad
Compare
|
The macro defines weren’t documented before I renamed them, which caused the CI to fail after the renaming. |
|
The failure seems to be related to moving the Kconfig file: You probably need to also update this line: Line 32 in db7a67b
|
|
Ok it passed Murdock CI. But the static tests always failed because I didn't touch the documentation during the renaming process, and it was missing from the start. |
|
So do I need to comment the macros for the review ? |
|
The alternative to adding Doxygen comments documenting the macros would be to update the list of expected Doxygen errors. That list will contain exceptions for the old file, but is missing them for the new file. |
3fcc23a to
5ea2ea5
Compare
5ea2ea5 to
de7e40f
Compare
|
Nice! Almost there. I would propose this change to address both issues: --- a/drivers/Makefile.dep
+++ b/drivers/Makefile.dep
@@ -4,8 +4,11 @@ ifneq (,$(filter adc%1c,$(USEMODULE)))
USEMODULE += adcxx1c
endif
-ifneq (,$(filter ads101%,$(USEMODULE)))
- USEMODULE += ads101x
+ifneq (,$(filter ads101x,$(USEMODULE)))
+ $(error "Module ads101x got renamed to ads1x1x.")
+endif
+ifneq (,$(filter ads1x1%,$(USEMODULE)))
+ USEMODULE += ads1x1x
endif
ifneq (,$(filter apds99%,$(USEMODULE))) |
de7e40f to
5e86311
Compare
Thanks for pointing that out, it should be fixed now! I guess I also need to include this change in the branch of the follow-up PR. However, I'm still a bit unsure about the purpose of this file. You mentioned that the change will be short-lived, but it should still be valid in the next PR, right? |
5e86311 to
dc4f6b1
Compare
Yes, you will have to rebase the other PR on this branch.
That file maps module names as provided by the user to actual drivers. For 1:1 matches that is indeed curious and seems unneccessary. But if you look closely at the old code that you just replaced, you can see a trailing ifneq (,$(filter ads101%,$(USEMODULE)))
USEMODULE += ads101x
endif(this made me just realise that we might have made a mistake and the error should also match on
Yes'ish. I haven't thought about the exact implication for the follow-up driver. Maybe the followup will match on all names, including the old drivers name, in that case the error makes no sense. Maybe as an warning as compilation with old code will not work without adjusting the names? We will see once this is merged and the other PR becomes ready. |
Thank you for the explanation.
Yes you're right, I'm going to fixed this immediately.
|
dc4f6b1 to
5bc8b5a
Compare
|
Hi @Teufelchen1, is it ok for you ? can we move forward by merging this PR ? |
Teufelchen1
left a comment
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.
Two changes accidentally slipped into this PR and need to be removed.
5bc8b5a to
b5d3404
Compare
Sorry it was a mistake, it should be fixed now. |
b5d3404 to
9dfd1d1
Compare
Contribution description
This PR renames the existing
ads101xdriver toads1x1x.The purpose of this change is to prepare the codebase and to simplify the review process for supporting both the ADS101x and ADS111x families in a unified driver.
No functional changes are introduced in this PR.
Only file names, Kconfig symbols, defines macros, and related references have been updated to reflect the new driver name.
This rename will simplify the review process for upcoming PR that extend the driver to handle the ADS111x family.
Testing procedure
Build and run existing
tests/drivers/ads1x1x(now renamed accordingly) to confirm no regressions.Issues/PRs references
A follow-up PR will introduce
ADS111xsupport and internal handling of family-specific differences.