Skip to content
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 1 commit into from
Apr 23, 2020

Conversation

galak
Copy link
Collaborator

@galak galak commented Apr 22, 2020

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]

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 galak requested a review from mbolivar-nordic April 22, 2020 01:30
@galak galak added area: Devicetree area: GPIO platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) labels Apr 22, 2020
@zephyrbot zephyrbot added the area: Samples Samples label Apr 22, 2020
@nandojve nandojve mentioned this pull request Apr 22, 2020
61 tasks
@stephanosio stephanosio self-requested a review April 22, 2020 02:52
Copy link
Member

@nandojve nandojve left a 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

Copy link
Member

@stephanosio stephanosio left a 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

@galak galak merged commit a3ec95c into zephyrproject-rtos:master Apr 23, 2020
@galak galak deleted the dt-sam-gpio branch April 23, 2020 10:59
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants