-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: adc: sam0: Add support for C2x #50388
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: adc: sam0: Add support for C2x #50388
Conversation
|
Hi @benys , You need make CI happy. Add CC: @attie-argentum , @lucasssvaz |
attie-argentum
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.
Otherwise, LGTM, thanks for the PR!
|
Besides what @attie-argentum noted, looks good. |
bff9692 to
654560c
Compare
|
@attie-argentum I hope that I fix your issues;) |
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.
Thanks for your changes... please use defined() and remove the & / * (ref/deref) - both for consistency. 🙂
654560c to
c340c10
Compare
|
I hope that it is now fine :) |
C21 doesn't have ADC_REFCTRL_REFSEL_AREFB and have different APBs. Signed-off-by: Kamil Serwus <[email protected]>
c340c10 to
8bb532e
Compare
attie-argentum
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.
LGTM, thanks!
| * The following MCLK clock configuration fix-up symbols map to the applicable | ||
| * APB-specific symbols, in order to accommodate different SoC series with the | ||
| * ADC core connected to different APBs. | ||
| */ | ||
| #if defined(MCLK_APBDMASK_ADC) || defined(MCLK_APBDMASK_ADC0) | ||
| # define MCLK_ADC (MCLK->APBDMASK.reg) | ||
| #elif defined(MCLK_APBCMASK_ADC0) | ||
| # define MCLK_ADC (MCLK->APBCMASK.reg) | ||
| #else | ||
| # error ADC not supported... |
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 can't this be supported in devicetree?
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.
At SAM MCU clock connection to ADC module is located in some processor in ABPD registry and some at APBC.
I don't find any usage at devicetree to set / get valid registry.
SAM Drives uses constraints from ASF headers.
According to #50384 this is fix for compilations for SAMs
C21 doesn't have ADC_REFCTRL_REFSEL_AREFB and have different APBs
Signed-off-by: Kamil Serwus [email protected]