-
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: gpio: gpio_sam: Convert to DT_INST #24578
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Convert driver to use new DT_INST macros throughout. We update one sample app to use a nodelabel reference. We also remove defines in dts_fixup.h as they are no longer needed. Signed-off-by: Kumar Gala <[email protected]>
galak
requested review from
fallrisk,
ioannisg,
mnkp,
nandojve,
nashif and
pabigot
as code owners
April 22, 2020 01:30
galak
added
area: Devicetree
area: GPIO
platform: Microchip SAM
Microchip SAM Platform (formerly Atmel SAM)
labels
Apr 22, 2020
61 tasks
nandojve
approved these changes
Apr 23, 2020
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 + AT86RF231 running samples/net/sockets/echo_client
*** Booting Zephyr OS build zephyr-v2.2.0-1871-g7dd4cc582156 ***
[00:00:00.007,000] <inf> net_config: Initializing network
[00:00:00.107,000] <inf> net_config: IPv6 address: fe80::ecff:f989:ddba:bc20
[00:00:00.107,000] <inf> net_config: IPv6 address: fe80::ecff:f989:ddba:bc20
[00:00:03.107,000] <inf> net_echo_client_sample: Run echo client
[00:00:03.107,000] <inf> net_echo_client_sample: Network connected
[00:00:03.107,000] <inf> net_echo_client_sample: Starting...
[00:00:03.108,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 28 bytes
[00:00:03.131,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 28 bytes, all ok
[00:00:03.132,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 123 bytes
[00:00:03.153,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 123 bytes, all ok
[00:00:03.154,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 36 bytes
[00:00:03.164,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 36 bytes, all ok
[00:00:03.165,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 29 bytes
[00:00:03.175,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 29 bytes, all ok
[00:00:03.176,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 14 bytes
[00:00:03.186,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 14 bytes, all ok
[00:00:03.186,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 19 bytes
[00:00:03.196,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 19 bytes, all ok
[00:00:03.196,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 103 bytes
[00:00:03.219,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 103 bytes, all ok
[00:00:03.220,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 120 bytes
[00:00:03.243,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 120 bytes, all ok
[00:00:03.244,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 61 bytes
[00:00:03.259,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 61 bytes, all ok
[00:00:03.259,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 84 bytes
[00:00:03.281,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 84 bytes, all ok
[00:00:03.281,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 2 bytes
[00:00:03.292,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 2 bytes, all ok
[00:00:03.293,000] <dbg> net_echo_client_sample.send_udp_data: IPv6 UDP: Sent 72 bytes
[00:00:03.312,000] <dbg> net_echo_client_sample.process_udp_proto: IPv6 UDP: Received and compared 72 bytes, all ok
stephanosio
approved these changes
Apr 23, 2020
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 and verified working on sam_e70_xplained
.
*** Booting Zephyr OS build zephyr-v2.2.0-1804-g2e6af610fe3b ***
Running test suite gpio_basic_test
===================================================================
starting test - test_gpio_port
Validate device PORTD
Check PORTD output 21 connected to input 20
OUT 21 to IN 20 linkage works
- bits_physical
- pin_physical
- check_raw_output_levels
- check_logic_output_levels
- check_input_levels
- bits_logical
- check_pulls
PASS - test_gpio_port
===================================================================
starting test - test_gpio_callback_add_remove
callback_2 triggered: 1
callback_1 triggered: 1
callback_2 triggered: 1
PASS - test_gpio_callback_add_remove
===================================================================
starting test - test_gpio_callback_self_remove
callback_remove_self triggered: 1
callback_1 triggered: 1
callback_1 triggered: 1
PASS - test_gpio_callback_self_remove
===================================================================
starting test - test_gpio_callback_enable_disable
callback_2 triggered: 1
callback_1 triggered: 1
callback_2 triggered: 1
callback_1 triggered: 1
PASS - test_gpio_callback_enable_disable
===================================================================
starting test - test_gpio_callback_variants
callback triggered: 1
OUT init a01, IN cfg 34000, cnt 1
callback triggered: 1
OUT init 600, IN cfg 54000, cnt 1
callback triggered: 1
OUT init 600, IN cfg 5c000, cnt 1
callback triggered: 1
OUT init a01, IN cfg 3c000, cnt 1
callback triggered: 1
callback triggered: 2
callback triggered: 3
OUT init 600, IN cfg 44000, cnt 3
callback triggered: 1
callback triggered: 2
callback triggered: 3
OUT init a01, IN cfg 24000, cnt 3
callback triggered: 1
callback triggered: 2
callback triggered: 3
OUT init 600, IN cfg 4c000, cnt 3
callback triggered: 1
callback triggered: 2
callback triggered: 3
OUT init a01, IN cfg 2c000, cnt 3
callback triggered: 1
callback triggered: 2
OUT init a01, IN cfg 74000, cnt 2
PASS - test_gpio_callback_variants
===================================================================
starting test - test_gpio_deprecated
callback triggered: 1
INT cfg 50000, cnt 1
callback triggered: 1
INT cfg 30000, cnt 1
callback triggered: 1
callback triggered: 2
INT cfg 74000, cnt 2
callback triggered: 1
callback triggered: 2
callback triggered: 3
INT cfg 40000, cnt 3
callback triggered: 1
callback triggered: 2
callback triggered: 3
INT cfg 20000, cnt 3
PASS - test_gpio_deprecated
===================================================================
Test suite gpio_basic_test succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL
pabigot
approved these changes
Apr 23, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Devicetree
area: GPIO
area: Samples
Samples
platform: Microchip SAM
Microchip SAM Platform (formerly Atmel SAM)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Convert driver to use new DT_INST macros throughout. We update one
sample app to use a nodelabel reference. We also remove defines in
dts_fixup.h as they are no longer needed.
Signed-off-by: Kumar Gala [email protected]