Skip to content

Conversation

@pabigot
Copy link
Contributor

@pabigot pabigot commented Oct 12, 2019

Tested on SAM-D21-Xplained Pro with 2-pin test, blinky, and button.

Checked D20 and R21 data sheets, there should be no incompatibilities.

@pabigot pabigot requested a review from MaureenHelm as a code owner October 12, 2019 11:12
@zephyrbot zephyrbot added area: Boards area: Tests Issues related to a particular existing or missing test labels Oct 12, 2019
@zephyrbot
Copy link

zephyrbot commented Oct 12, 2019

All checks passed.

checkpatch (informational only, not a failure)

-:396: WARNING:LONG_LINE: line over 80 characters
#396: FILE: drivers/gpio/gpio_sam0.c:253:
+					      (DEV_DATA(dev)->debounce & BIT(pin)) != 0,

- total: 0 errors, 1 warnings, 444 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Your patch has style problems, please review.

NOTE: Ignored message types: AVOID_EXTERNS BRACES CONFIG_EXPERIMENTAL CONST_STRUCT DATE_TIME FILE_PATH_CHANGES MINMAX NETWORKING_BLOCK_COMMENT_STYLE PRINTK_WITHOUT_KERN_LEVEL SPLIT_STRING VOLATILE

NOTE: If any of the errors are false positives, please report
      them to the maintainers.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

@pabigot
Copy link
Contributor Author

pabigot commented Oct 12, 2019

@mnkp This does not pass the (updated) 1-pin test for interrupts. I believe that's because on SAM0 a pin that is configured for interrupts is set for an alternate pinmux function (EIC) and cannot be set with the GPIO interface.

Although I've confirmed that setting and clearing the pin results in a change in the input value before gpio_pin_interrupt_configure(), while the interrupts are configured no changes to the input value can be detected through the GPIO interface, and only one interrupt is ever signaled in the loop that toggles the GPIO.

The two pin interrupt tests pass.

Copy link
Contributor

@jfischer-no jfischer-no left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on samr21xpro with tests/drivers/gpio/gpio_basic_api, blinky and button samples. ✔️ LGTM

@pabigot pabigot force-pushed the gpio/sam0 branch 5 times, most recently from b565bb9 to 6ec3ed4 Compare October 15, 2019 22:47
@benpicco benpicco mentioned this pull request Oct 16, 2019
15 tasks
benpicco and others added 3 commits October 16, 2019 12:14
SAMD5x/SAME5x header files do not provide this define anymore.
On SAMD2x it was 0, this is still valid.

Signed-off-by: Benjamin Valentin <[email protected]>
Drop the port access, rework to separate interrupt and pin
configuration, add new API.

Signed-off-by: Peter Bigot <[email protected]>
Use standard spelling for pull and active flags.  Correct LED active
level (based on SAM-D21-Xplained-Pro).

Signed-off-by: Peter Bigot <[email protected]>
@carlescufi carlescufi merged commit 099c514 into zephyrproject-rtos:topic-gpio Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards area: GPIO area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants