-
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: adc: adc_sam_afec: rework device tree support #24580
Conversation
Reworked adc_sam_afec driver to utilize new DT_INST macros as part of this rework we also now get pin ctrl/mux configuration information from the device tree instead of via Kconfig and defines in soc_pinmap.h We remove defines from dts_fixup.h and soc_pinmap.h and associated Kconfig symbols that are no longer needed due to getting all that information from devicetree. Signed-off-by: Kumar Gala <[email protected]>
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.
Tested with SAM_V71_XULT
*** Booting Zephyr OS build zephyr-v2.2.0-1872-ga568a5ef993d ***
Running test suite adc_basic_test
===================================================================
starting test - test_adc_sample_one_channel
Samples read: 0x0fc6 0x0000 0x0000 0x0000 0x0000 0x0000
PASS - test_adc_sample_one_channel
===================================================================
starting test - test_adc_sample_two_channels
SKIP - test_adc_sample_two_channels
===================================================================
starting test - test_adc_asynchronous_call
Samples read: 0x0f51 0x0f8c 0x0f81 0x0f91 0x0f81 0x0000
PASS - test_adc_asynchronous_call
===================================================================
starting test - test_adc_sample_with_interval
sample_with_interval_callback: sampling 0
sample_with_interval_callback: sampling 1
sample_with_interval_callback: sampling 2
sample_with_interval_callback: sampling 3
sample_with_interval_callback: sampling 4
Samples read: 0x0f4c 0x0f4f 0x0f50 0x0f4f 0x0f52 0x0000
PASS - test_adc_sample_with_interval
===================================================================
starting test - test_adc_repeated_samplings
repeated_samplings_callback: done 1
Samples read: 0x0f59 0x0000 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 2
Samples read: 0x0f59 0x0f53 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 3
Samples read: 0x0f52 0x0f53 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 4
Samples read: 0x0f53 0x0f53 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 5
Samples read: 0x0f51 0x0f53 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 6
Samples read: 0x0f58 0x0f53 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 7
Samples read: 0x0f50 0x0f53 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 8
Samples read: 0x0f51 0x0f53 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 9
Samples read: 0x0f51 0x0f53 0x0000 0x0000 0x0000 0x0000
repeated_samplings_callback: done 10
Samples read: 0x0f54 0x0f53 0x0000 0x0000 0x0000 0x0000
PASS - test_adc_repeated_samplings
===================================================================
starting test - test_adc_invalid_request
E: ADC resolution value 0 is not valid
E: ADC resolution value 0 is not valid
Samples read: 0x0f56 0x0000 0x0000 0x0000 0x0000 0x0000
PASS - test_adc_invalid_request
===================================================================
Test suite adc_basic_test succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL
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.
Did a quick pass and there does not seem to be anything obviously wrong with it.
Tested and verified working on sam_e70_xplained
.
Reworked adc_sam_afec driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h
We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.
Signed-off-by: Kumar Gala [email protected]